From b61cb78c9463d8c5b6ba4a7f16224e407ab955af Mon Sep 17 00:00:00 2001 From: tsteven4 Date: Wed, 22 Jan 2014 23:39:04 +0000 Subject: [PATCH] rename the waypoint class Waypoint per common capitilization convetions courtesy of netbeans refactoring. --- gpsbabel/alan.cc | 22 ++--- gpsbabel/an1.cc | 12 +-- gpsbabel/arcdist.cc | 28 +++---- gpsbabel/bcr.cc | 20 ++--- gpsbabel/bend.cc | 24 +++--- gpsbabel/brauniger_iq.cc | 4 +- gpsbabel/bushnell.cc | 4 +- gpsbabel/bushnell_trl.cc | 6 +- gpsbabel/cet_util.cc | 8 +- gpsbabel/compegps.cc | 16 ++-- gpsbabel/cst.cc | 12 +-- gpsbabel/csv_util.cc | 12 +-- gpsbabel/defs.h | 70 ++++++++-------- gpsbabel/delbin.cc | 54 ++++++------- gpsbabel/delgpl.cc | 6 +- gpsbabel/destinator.cc | 20 ++--- gpsbabel/dg-100.cc | 4 +- gpsbabel/discard.cc | 4 +- gpsbabel/dmtlog.cc | 26 +++--- gpsbabel/duplicate.cc | 10 +-- gpsbabel/easygps.cc | 6 +- gpsbabel/enigma.cc | 4 +- gpsbabel/exif.cc | 16 ++-- gpsbabel/filterdefs.h | 2 +- gpsbabel/g7towin.cc | 20 ++--- gpsbabel/garmin.cc | 34 ++++---- gpsbabel/garmin_fit.cc | 4 +- gpsbabel/garmin_fs.cc | 10 +-- gpsbabel/garmin_fs.h | 10 +-- gpsbabel/garmin_gpi.cc | 34 ++++---- gpsbabel/garmin_txt.cc | 64 +++++++-------- gpsbabel/garmin_xt.cc | 10 +-- gpsbabel/gdb.cc | 70 ++++++++-------- gpsbabel/geo.cc | 6 +- gpsbabel/ggv_log.cc | 8 +- gpsbabel/ggv_ovl.cc | 30 +++---- gpsbabel/glogbook.cc | 6 +- gpsbabel/gnav_trl.cc | 6 +- gpsbabel/google.cc | 4 +- gpsbabel/googledir.cc | 2 +- gpsbabel/gopal.cc | 10 +-- gpsbabel/gpssim.cc | 2 +- gpsbabel/gpsutil.cc | 6 +- gpsbabel/gpx.cc | 26 +++--- gpsbabel/gtm.cc | 18 ++--- gpsbabel/gtrnctr.cc | 14 ++-- gpsbabel/gui/gpsbabelfe.ts | 147 +++++++++++++++++----------------- gpsbabel/gui/gpsbabelfe_de.ts | 147 +++++++++++++++++----------------- gpsbabel/gui/gpsbabelfe_es.ts | 147 +++++++++++++++++----------------- gpsbabel/gui/gpsbabelfe_fr.ts | 147 +++++++++++++++++----------------- gpsbabel/gui/gpsbabelfe_hu.ts | 147 +++++++++++++++++----------------- gpsbabel/gui/gpsbabelfe_it.ts | 147 +++++++++++++++++----------------- gpsbabel/gui/gpsbabelfe_ru.ts | 147 +++++++++++++++++----------------- gpsbabel/height.cc | 4 +- gpsbabel/hiketech.cc | 10 +-- gpsbabel/holux.cc | 6 +- gpsbabel/html.cc | 4 +- gpsbabel/humminbird.cc | 38 ++++----- gpsbabel/igc.cc | 70 ++++++++-------- gpsbabel/ignrando.cc | 6 +- gpsbabel/igo8.cc | 6 +- gpsbabel/ik3d.cc | 6 +- gpsbabel/interpolate.cc | 10 +-- gpsbabel/itracku.cc | 42 +++++----- gpsbabel/jogmap.cc | 2 +- gpsbabel/jtr.cc | 8 +- gpsbabel/kml.cc | 60 +++++++------- gpsbabel/lmx.cc | 6 +- gpsbabel/lowranceusr.cc | 26 +++--- gpsbabel/lowranceusr4.cc | 46 +++++------ gpsbabel/magellan.h | 2 +- gpsbabel/maggeo.cc | 6 +- gpsbabel/magproto.cc | 32 ++++---- gpsbabel/main.cc | 2 +- gpsbabel/mapasia.cc | 14 ++-- gpsbabel/mapbar_track.cc | 6 +- gpsbabel/mapsend.cc | 16 ++-- gpsbabel/mapsource.cc | 78 +++++++++--------- gpsbabel/mkshort.cc | 2 +- gpsbabel/mmo.cc | 36 ++++----- gpsbabel/mtk_locus.cc | 8 +- gpsbabel/mtk_logger.cc | 4 +- gpsbabel/navicache.cc | 2 +- gpsbabel/naviguide.cc | 6 +- gpsbabel/navilink.cc | 66 +++++++-------- gpsbabel/navilink.h | 2 +- gpsbabel/navitel.cc | 8 +- gpsbabel/netstumbler.cc | 16 ++-- gpsbabel/nmea.cc | 54 ++++++------- gpsbabel/nmn4.cc | 6 +- gpsbabel/osm.cc | 28 +++---- gpsbabel/overlay.cc | 22 ++--- gpsbabel/ozi.cc | 24 +++--- gpsbabel/pcx.cc | 12 +-- gpsbabel/pocketfms_bc.cc | 6 +- gpsbabel/pocketfms_fp.cc | 14 ++-- gpsbabel/pocketfms_wp.cc | 6 +- gpsbabel/polygon.cc | 10 +-- gpsbabel/position.cc | 8 +- gpsbabel/psitrex.cc | 32 ++++---- gpsbabel/radius.cc | 24 +++--- gpsbabel/random.cc | 6 +- gpsbabel/raymarine.cc | 44 +++++----- gpsbabel/reverse_route.cc | 4 +- gpsbabel/route.cc | 44 +++++----- gpsbabel/saroute.cc | 10 +-- gpsbabel/sbn.cc | 10 +-- gpsbabel/sbp.cc | 4 +- gpsbabel/shape.cc | 10 +-- gpsbabel/skyforce.cc | 20 ++--- gpsbabel/skytraq.cc | 12 +-- gpsbabel/smplrout.cc | 16 ++-- gpsbabel/sort.cc | 4 +- gpsbabel/stackfilter.cc | 4 +- gpsbabel/stmsdf.cc | 32 ++++---- gpsbabel/stmwpp.cc | 8 +- gpsbabel/subrip.cc | 6 +- gpsbabel/swapdata.cc | 4 +- gpsbabel/tef_xml.cc | 6 +- gpsbabel/teletype.cc | 2 +- gpsbabel/text.cc | 2 +- gpsbabel/tiger.cc | 8 +- gpsbabel/tmpro.cc | 6 +- gpsbabel/tomtom.cc | 14 ++-- gpsbabel/tpg.cc | 6 +- gpsbabel/tpo.cc | 36 ++++----- gpsbabel/trackfilter.cc | 60 +++++++------- gpsbabel/transform.cc | 10 +-- gpsbabel/unicsv.cc | 10 +-- gpsbabel/util.cc | 2 +- gpsbabel/v900.cc | 8 +- gpsbabel/validate.cc | 2 +- gpsbabel/vcf.cc | 2 +- gpsbabel/vidaone.cc | 4 +- gpsbabel/vitosmt.cc | 6 +- gpsbabel/vitovtt.cc | 4 +- gpsbabel/vpl.cc | 4 +- gpsbabel/waypt.cc | 96 +++++++++++----------- gpsbabel/wbt-200.cc | 14 ++-- gpsbabel/wfff_xml.cc | 4 +- gpsbabel/wintec_tes.cc | 6 +- gpsbabel/xcsv.cc | 2 +- gpsbabel/xol.cc | 14 ++-- gpsbabel/yahoo.cc | 4 +- 144 files changed, 1646 insertions(+), 1639 deletions(-) diff --git a/gpsbabel/alan.cc b/gpsbabel/alan.cc index 661b416a8..1b83abc15 100644 --- a/gpsbabel/alan.cc +++ b/gpsbabel/alan.cc @@ -493,12 +493,12 @@ static time_t unpack_time(int32_t date, int32_t time) /**************************************************************************/ -static waypoint* get_wpt(struct wprdata* wprdata, unsigned n) +static Waypoint* get_wpt(struct wprdata* wprdata, unsigned n) { struct wpthdr* wpthdr; struct wpt* wpt; int j, idx; - waypoint* WP; + Waypoint* WP; wpthdr = &(wprdata->wpthdr); idx = wpthdr->idx[n]; @@ -508,7 +508,7 @@ static waypoint* get_wpt(struct wprdata* wprdata, unsigned n) } wpt = &(wprdata->wpt[idx]); - WP = new waypoint; + WP = new Waypoint; WP->latitude = -pt2deg(wpt->pt.y); WP->longitude = pt2deg(wpt->pt.x); WP->SetCreationTime(unpack_time(wpt->date, wpt->time)); @@ -535,7 +535,7 @@ static void wpr_read(void) struct rtehdr* rtehdr; struct rte* rte; int i, j, idx; - waypoint* WP; + Waypoint* WP; route_head* RT; if (gbfread(&wprdata, sizeof(struct wprdata), 1, fin) != 1) { @@ -596,7 +596,7 @@ static void trl_read(void) struct trldata trldata; struct trkhdr* trkhdr; struct trklog* trklog; - waypoint* WP; + Waypoint* WP; route_head* TL; int i, j; @@ -643,7 +643,7 @@ static void trl_read(void) /* track points */ trklog = &(trldata.trklog[i]); for (j=0; jtotalpt; j++) { - WP = new waypoint; + WP = new Waypoint; WP->latitude = -pt2deg(trklog->pt[j].y); WP->longitude = pt2deg(trklog->pt[j].x); WP->altitude = hgt2m(trklog->sh[j].height); @@ -659,7 +659,7 @@ static void trl_read(void) /**************************************************************************/ -static int find_wpt(struct wprdata* wprdata, const waypoint* WP) +static int find_wpt(struct wprdata* wprdata, const Waypoint* WP) { struct wpt pattern, *wpt; int i, wpt_idx; @@ -685,7 +685,7 @@ static int find_wpt(struct wprdata* wprdata, const waypoint* WP) return -1; } -static int add_wpt(struct wprdata* wprdata, const waypoint* WP,int isroute) +static int add_wpt(struct wprdata* wprdata, const Waypoint* WP,int isroute) { struct wpthdr* wpthdr; int hdr_idx, wpt_idx; @@ -733,7 +733,7 @@ static int add_wpt(struct wprdata* wprdata, const waypoint* WP,int isroute) return hdr_idx; } -static void wpr_waypoint(const waypoint* WP) +static void wpr_waypoint(const Waypoint* WP) { add_wpt(&WPR, WP, 0); } @@ -771,7 +771,7 @@ static void wpr_route_hdr(const route_head* RT) /* rtehdr->rteno = rte_idx; */ } -static void wpr_route_wpt(const waypoint* WP) +static void wpr_route_wpt(const Waypoint* WP) { struct rte* rte; int wpt_idx; @@ -860,7 +860,7 @@ static void trl_track_hdr(const route_head* TL) TRL.loghdr.num = idx; } -static void trl_track_wpt(const waypoint* WP) +static void trl_track_wpt(const Waypoint* WP) { struct trklog* trklog; struct trkhdr* trkhdr; diff --git a/gpsbabel/an1.cc b/gpsbabel/an1.cc index b9e51ad21..f13fc2b71 100644 --- a/gpsbabel/an1.cc +++ b/gpsbabel/an1.cc @@ -692,14 +692,14 @@ static void Read_AN1_Waypoints(gbfile* f) unsigned long count = 0; unsigned long i = 0; an1_waypoint_record* rec = NULL; - waypoint* wpt_tmp; + Waypoint* wpt_tmp; char* icon = NULL; ReadShort(f); count = ReadLong(f); for (i = 0; i < count; i++) { rec = Alloc_AN1_Waypoint(); Read_AN1_Waypoint(f, rec); - wpt_tmp = new waypoint; + wpt_tmp = new Waypoint; if (rec->creation_time) { wpt_tmp->SetCreationTime(rec->creation_time); @@ -736,7 +736,7 @@ static void Read_AN1_Waypoints(gbfile* f) } static void -Write_One_AN1_Waypoint(const waypoint* wpt) +Write_One_AN1_Waypoint(const Waypoint* wpt) { an1_waypoint_record* rec; int local; @@ -847,7 +847,7 @@ static void Read_AN1_Lines(gbfile* f) an1_line_record* rec = NULL; an1_vertex_record* vert = NULL; route_head* rte_head; - waypoint* wpt_tmp; + Waypoint* wpt_tmp; ReadShort(f); count = ReadLong(f); @@ -874,7 +874,7 @@ static void Read_AN1_Lines(gbfile* f) Read_AN1_Vertex(f, vert); /* create route point */ - wpt_tmp = new waypoint; + wpt_tmp = new Waypoint; wpt_tmp->latitude = DecodeOrd(vert->lat); wpt_tmp->longitude = -DecodeOrd(vert->lon); wpt_tmp->shortname = QString().sprintf("\\%5.5lx", rtserial++); @@ -1005,7 +1005,7 @@ Write_One_AN1_Line(const route_head* rte) } static void -Write_One_AN1_Vertex(const waypoint* wpt) +Write_One_AN1_Vertex(const Waypoint* wpt) { an1_vertex_record* rec; int local; diff --git a/gpsbabel/arcdist.cc b/gpsbabel/arcdist.cc index 83bf867e2..b8d023b46 100644 --- a/gpsbabel/arcdist.cc +++ b/gpsbabel/arcdist.cc @@ -41,7 +41,7 @@ typedef struct { double distance; double prjlatitude, prjlongitude; double frac; - waypoint* arcpt1, * arcpt2; + Waypoint* arcpt1, * arcpt2; } extra_data; static @@ -80,23 +80,23 @@ arglist_t arcdist_args[] = { #define BADVAL 999999 static void -arcdist_arc_disp_wpt_cb(const waypoint* arcpt2) +arcdist_arc_disp_wpt_cb(const Waypoint* arcpt2) { queue* elem, * tmp; - waypoint* waypointp; + Waypoint* waypointp; extra_data* ed; double dist; double prjlat, prjlon, frac; - static waypoint* arcpt1 = NULL; + static Waypoint* arcpt1 = NULL; if (arcpt2 && arcpt2->latitude != BADVAL && arcpt2->longitude != BADVAL && (ptsopt || (arcpt1 && (arcpt1->latitude != BADVAL && arcpt1->longitude != BADVAL)))) { #if NEWQ - foreach(waypoint* waypointp, waypt_list) { + foreach(Waypoint* waypointp, waypt_list) { #else QUEUE_FOR_EACH(&waypt_head, elem, tmp) { - waypointp = (waypoint*) elem; + waypointp = (Waypoint*) elem; #endif if (waypointp->extra_data) { ed = (extra_data*) waypointp->extra_data; @@ -133,14 +133,14 @@ arcdist_arc_disp_wpt_cb(const waypoint* arcpt2) ed->prjlongitude = prjlon; ed->frac = frac; ed->arcpt1 = arcpt1; - ed->arcpt2 = (waypoint*) arcpt2; + ed->arcpt2 = (Waypoint*) arcpt2; } } waypointp->extra_data = ed; } } } - arcpt1 = (waypoint*) arcpt2; + arcpt1 = (Waypoint*) arcpt2; } static void @@ -160,12 +160,12 @@ arcdist_process(void) int fileline = 0; char* line; gbfile* file_in; - waypoint* arcpt2, * arcpt1; + Waypoint* arcpt2, * arcpt1; file_in = gbfopen(arcfileopt, "r", MYNAME); - arcpt1 = new waypoint; - arcpt2 = new waypoint; + arcpt1 = new Waypoint; + arcpt2 = new Waypoint; arcdist_arc_disp_hdr_cb(NULL); arcpt2->latitude = arcpt2->longitude = BADVAL; @@ -189,7 +189,7 @@ arcdist_process(void) if (argsfound != 2 && strspn(line, " \t\n") < strlen(line)) { warning(MYNAME ": Warning: Arc file contains unusable vertex on line %d.\n", fileline); } else { - waypoint* arcpttmp = arcpt1; + Waypoint* arcpttmp = arcpt1; arcdist_arc_disp_wpt_cb(arcpt2); arcpt1 = arcpt2; arcpt2 = arcpttmp; @@ -207,10 +207,10 @@ arcdist_process(void) removed = 0; #if NEWQ - foreach(waypoint* wp, waypt_list) { + foreach(Waypoint* wp, waypt_list) { #else QUEUE_FOR_EACH(&waypt_head, elem, tmp) { - waypoint* wp = (waypoint*) elem; + Waypoint* wp = (Waypoint*) elem; #endif extra_data* ed; ed = (extra_data*) wp->extra_data; diff --git a/gpsbabel/bcr.cc b/gpsbabel/bcr.cc index 18a3e073d..f76b383ec 100644 --- a/gpsbabel/bcr.cc +++ b/gpsbabel/bcr.cc @@ -126,7 +126,7 @@ bcr_icon_mapping_t bcr_icon_mapping[] = { }; static void -bcr_handle_icon_str(const char* str, waypoint* wpt) +bcr_handle_icon_str(const char* str, Waypoint* wpt) { bcr_icon_mapping_t* m; @@ -214,11 +214,11 @@ bcr_rd_deinit(void) static void bcr_create_waypts_from_route(route_head* route) { - waypoint* wpt; + Waypoint* wpt; queue* elem, *tmp; QUEUE_FOR_EACH(&route->waypoint_list, elem, tmp) { - wpt = new waypoint(*(waypoint*) elem); + wpt = new Waypoint(*(Waypoint*) elem); waypt_add(wpt); } } @@ -275,7 +275,7 @@ bcr_data_read(void) char station[32]; char* str; int mlat, mlon; /* mercator data */ - waypoint* wpt; + Waypoint* wpt; snprintf(station, sizeof(station), "STATION%d", index); if (NULL == (str = inifile_readstr(ini, "coordinates", station))) { @@ -286,7 +286,7 @@ bcr_data_read(void) fatal(MYNAME ": structure error at %s (Coordinates)!\n", station); } - wpt = new waypoint; + wpt = new Waypoint; wpt->shortname = station; bcr_mercator_to_wgs84(mlat, mlon, &wpt->latitude, &wpt->longitude); @@ -358,7 +358,7 @@ bcr_route_trailer(const route_head* rte) } static void -bcr_write_wpt(const waypoint* wpt) +bcr_write_wpt(const Waypoint* wpt) { } @@ -384,7 +384,7 @@ static void bcr_route_header(const route_head* route) { queue* elem, *tmp; - waypoint* wpt; + Waypoint* wpt; QString sout; int i, north, east, nmin, nmax, emin, emax; @@ -411,7 +411,7 @@ bcr_route_header(const route_head* route) i = 0; QUEUE_FOR_EACH(&route->waypoint_list, elem, tmp) { const char* icon; - waypoint* wpt = (waypoint*) elem; + Waypoint* wpt = (Waypoint*) elem; i++; @@ -429,7 +429,7 @@ bcr_route_header(const route_head* route) i = 0; QUEUE_FOR_EACH(&route->waypoint_list, elem, tmp) { i++; - wpt = (waypoint*) elem; + wpt = (Waypoint*) elem; bcr_wgs84_to_mercator(wpt->latitude, wpt->longitude, &north, &east); @@ -457,7 +457,7 @@ bcr_route_header(const route_head* route) QString s1, s2; i++; - wpt = (waypoint*) elem; + wpt = (Waypoint*) elem; s1 = wpt->notes; if (s1.isEmpty()) { s1 = wpt->description; diff --git a/gpsbabel/bend.cc b/gpsbabel/bend.cc index 828612212..290d248a8 100644 --- a/gpsbabel/bend.cc +++ b/gpsbabel/bend.cc @@ -70,8 +70,8 @@ bend_init(const char* args) route_flush_all_routes(); } -static waypoint* -create_wpt_dest(const waypoint* wpt_orig, double lat_orig, +static Waypoint* +create_wpt_dest(const Waypoint* wpt_orig, double lat_orig, double long_orig, double lat_orig_adj, double long_orig_adj) { double distance = gcdist(lat_orig, long_orig, @@ -79,7 +79,7 @@ create_wpt_dest(const waypoint* wpt_orig, double lat_orig, double frac; double lat_dest; double long_dest; - waypoint* wpt_dest = NULL; + Waypoint* wpt_dest = NULL; distance = radtometers(distance); if (distance <= maxDist) { return NULL; @@ -90,7 +90,7 @@ create_wpt_dest(const waypoint* wpt_orig, double lat_orig, linepart(lat_orig, long_orig, lat_orig_adj, long_orig_adj, frac, &lat_dest, &long_dest); - wpt_dest = new waypoint(*wpt_orig); + wpt_dest = new Waypoint(*wpt_orig); wpt_dest->latitude = DEG(lat_dest); wpt_dest->longitude = DEG(long_dest); @@ -117,16 +117,16 @@ is_small_angle(double lat_orig, double long_orig, double lat_orig_prev, static void process_route(const route_head* route_orig, route_head* route_dest) { - waypoint* wpt_orig_prev = NULL; - waypoint* wpt_orig = NULL; + Waypoint* wpt_orig_prev = NULL; + Waypoint* wpt_orig = NULL; queue* elem, *tmp; QUEUE_FOR_EACH(&route_orig->waypoint_list, elem, tmp) { - waypoint* wpt_orig_next = (waypoint*)elem; + Waypoint* wpt_orig_next = (Waypoint*)elem; if (wpt_orig_prev == NULL) { if (wpt_orig != NULL) { - waypoint* waypoint_dest = new waypoint(*wpt_orig); + Waypoint* waypoint_dest = new Waypoint(*wpt_orig); route_add_wpt(route_dest, waypoint_dest); } } else { @@ -138,14 +138,14 @@ process_route(const route_head* route_orig, route_head* route_dest) double lat_orig_next = RAD(wpt_orig_next->latitude); double long_orig_next = RAD(wpt_orig_next->longitude); - waypoint* wpt_dest_next = NULL; + Waypoint* wpt_dest_next = NULL; if (is_small_angle(lat_orig, long_orig, lat_orig_prev, long_orig_prev, lat_orig_next, long_orig_next)) { - waypoint* waypoint_dest = new waypoint(*wpt_orig); + Waypoint* waypoint_dest = new Waypoint(*wpt_orig); route_add_wpt(route_dest, waypoint_dest); } else { - waypoint* wpt_dest_prev = create_wpt_dest(wpt_orig, + Waypoint* wpt_dest_prev = create_wpt_dest(wpt_orig, lat_orig, long_orig, lat_orig_prev, long_orig_prev); if (wpt_dest_prev != NULL) { route_add_wpt(route_dest, wpt_dest_prev); @@ -166,7 +166,7 @@ process_route(const route_head* route_orig, route_head* route_dest) } if (wpt_orig != NULL) { - waypoint* waypoint_dest = new waypoint(*wpt_orig); + Waypoint* waypoint_dest = new Waypoint(*wpt_orig); route_add_wpt(route_dest, waypoint_dest); } } diff --git a/gpsbabel/brauniger_iq.cc b/gpsbabel/brauniger_iq.cc index b96d160b7..aa76cef7d 100644 --- a/gpsbabel/brauniger_iq.cc +++ b/gpsbabel/brauniger_iq.cc @@ -84,7 +84,7 @@ static int process_data(const unsigned char* data) static route_head* track; static unsigned char interval; time_t finish; - waypoint* wpt = NULL; + Waypoint* wpt = NULL; int i; if (global_opts.debug_level >= 3) { @@ -200,7 +200,7 @@ static int process_data(const unsigned char* data) break; case st_sample_alt: - wpt = new waypoint; + wpt = new Waypoint; wpt->latitude = wpt->longitude = 0.0; wpt->SetCreationTime(creation); creation += interval; diff --git a/gpsbabel/bushnell.cc b/gpsbabel/bushnell.cc index 856b6b0e0..ce71d63b9 100644 --- a/gpsbabel/bushnell.cc +++ b/gpsbabel/bushnell.cc @@ -205,7 +205,7 @@ bushnell_read(void) int32_t lat_tmp,lon_tmp; unsigned int proximity; unsigned int icon; - waypoint* wpt_tmp = new waypoint; + Waypoint* wpt_tmp = new Waypoint; lat_tmp = gbfgetint32(file_in); lon_tmp = gbfgetint32(file_in); @@ -225,7 +225,7 @@ bushnell_read(void) } static void -bushnell_write_one(const waypoint* wpt) +bushnell_write_one(const Waypoint* wpt) { char tbuf[20]; // 19 text bytes + null terminator. char padding[2] = {0, 0}; diff --git a/gpsbabel/bushnell_trl.cc b/gpsbabel/bushnell_trl.cc index 26370d190..e13eaccf5 100644 --- a/gpsbabel/bushnell_trl.cc +++ b/gpsbabel/bushnell_trl.cc @@ -97,7 +97,7 @@ bushnell_read(void) int lat_tmp,lon_tmp; while (1) { - waypoint* wpt_tmp; + Waypoint* wpt_tmp; lat_tmp = gbfgetint32(file_in); lon_tmp = gbfgetint32(file_in); @@ -106,7 +106,7 @@ bushnell_read(void) break; } - wpt_tmp = new waypoint; + wpt_tmp = new Waypoint; wpt_tmp->latitude = lat_tmp / 10000000.0; wpt_tmp->longitude = lon_tmp / 10000000.0; @@ -115,7 +115,7 @@ bushnell_read(void) } static void -bushnell_write_one(const waypoint* wpt) +bushnell_write_one(const Waypoint* wpt) { int32_t lat = wpt->latitude * 10000000.0; int32_t lon = wpt->longitude * 10000000.0; diff --git a/gpsbabel/cet_util.cc b/gpsbabel/cet_util.cc index 225fecb51..b89c26edd 100644 --- a/gpsbabel/cet_util.cc +++ b/gpsbabel/cet_util.cc @@ -913,9 +913,9 @@ cet_convert_init(const char* cs_name, const int force) /* -------------------------------------------------------------------- */ static void -cet_flag_waypt(const waypoint* wpt) +cet_flag_waypt(const Waypoint* wpt) { - ((waypoint*)(wpt))->wpt_flags.cet_converted = 1; + ((Waypoint*)(wpt))->wpt_flags.cet_converted = 1; } static void @@ -982,9 +982,9 @@ cet_convert_string(const QString& str) /* cet_convert_waypt: internal used within cet_convert_strings process */ static void -cet_convert_waypt(const waypoint* wpt) +cet_convert_waypt(const Waypoint* wpt) { - waypoint* w = (waypoint*)wpt; + Waypoint* w = (Waypoint*)wpt; format_specific_data* fs; if ((cet_output == 0) && (w->wpt_flags.cet_converted != 0)) { diff --git a/gpsbabel/compegps.cc b/gpsbabel/compegps.cc index ca3f82e72..758c1c339 100644 --- a/gpsbabel/compegps.cc +++ b/gpsbabel/compegps.cc @@ -155,12 +155,12 @@ compegps_parse_time(const char* c, struct tm* tm) /* specialized readers */ -static waypoint* +static Waypoint* parse_wpt(char* buff) { int col = -1; char* c, *cx; - waypoint* wpt = new waypoint; + Waypoint* wpt = new Waypoint; struct tm tm; int has_time = 0; memset(&tm, 0, sizeof(tm)); @@ -229,7 +229,7 @@ parse_wpt(char* buff) } static void -parse_wpt_info(const char* buff, waypoint* wpt) /* "w" */ +parse_wpt_info(const char* buff, Waypoint* wpt) /* "w" */ { char* c; int col = -1; @@ -272,13 +272,13 @@ parse_wpt_info(const char* buff, waypoint* wpt) /* "w" */ } } -static waypoint* +static Waypoint* parse_trkpt(char* buff) { int col = -1; char* c; struct tm tm; - waypoint* wpt = new waypoint; + Waypoint* wpt = new Waypoint; c = strstr(buff, "A "); if (c == buff) { @@ -396,7 +396,7 @@ compegps_data_read(void) char* buff; int line = 0; int input_datum; - waypoint* wpt = NULL; + Waypoint* wpt = NULL; route_head* route = NULL; route_head* track = NULL; @@ -478,7 +478,7 @@ compegps_data_read(void) /* ----------------------------------------------------------- */ static void -write_waypt_cb(const waypoint* wpt) +write_waypt_cb(const Waypoint* wpt) { QString name; @@ -548,7 +548,7 @@ write_track_hdr_cb(const route_head* trk) } static void -write_trkpt_cb(const waypoint* wpt) +write_trkpt_cb(const Waypoint* wpt) { char buff[128]; diff --git a/gpsbabel/cst.cc b/gpsbabel/cst.cc index cda0949fe..f5f1f0630 100644 --- a/gpsbabel/cst.cc +++ b/gpsbabel/cst.cc @@ -52,14 +52,14 @@ arglist_t cst_args[] = { /* helpers */ static void -cst_add_wpt(const route_head* track, waypoint* wpt) +cst_add_wpt(const route_head* track, Waypoint* wpt) { if ((wpt == NULL) || (track == NULL)) { return; } if (wpt->shortname != NULL) { - waypt_add(new waypoint(*wpt)); + waypt_add(new Waypoint(*wpt)); // Rather than creating a new waypt on each read, tis format bizarrely // recycles the same one, relying on new waypoint(*) above and then manually // resetting fields. Weird. @@ -69,9 +69,9 @@ cst_add_wpt(const route_head* track, waypoint* wpt) temp_route = route_head_alloc(); route_add_head(temp_route); } - route_add_wpt(temp_route, new waypoint(*wpt)); + route_add_wpt(temp_route, new Waypoint(*wpt)); } - track_add_wpt((route_head*)track, (waypoint*)wpt); + track_add_wpt((route_head*)track, (Waypoint*)wpt); } static char* @@ -164,7 +164,7 @@ cst_data_read(void) int cst_version; int cst_points = -1; route_head* track = NULL; - waypoint* wpt = NULL; + Waypoint* wpt = NULL; while ((buff = gbfgetstr(fin))) { char* cin = buff; @@ -266,7 +266,7 @@ cst_data_read(void) wpt = NULL; - wpt = new waypoint; + wpt = new Waypoint; if (5 != sscanf(cin, "%lf %lf %lf %d %s", &wpt->longitude, diff --git a/gpsbabel/csv_util.cc b/gpsbabel/csv_util.cc index df8e1702c..e4b37dbf7 100644 --- a/gpsbabel/csv_util.cc +++ b/gpsbabel/csv_util.cc @@ -522,7 +522,7 @@ ddmmdir_to_degrees(const char* ddmmdir) /***************************************************************************** * human_to_dec() - convert a "human-readable" lat and/or lon to decimal - * usage: human_to_dec( "N 41° 09.12' W 085° 09.36'", &lat, &lon ); + * usage: human_to_dec( "N 41� 09.12' W 085� 09.36'", &lat, &lon ); * human_to_dec( "41 9 5.652 N", &lat, &lon ); * * which: 0-no preference 1-prefer lat 2-prefer lon @@ -991,7 +991,7 @@ time_to_yyyymmdd(QDateTime t) } static garmin_fs_t* -gmsd_init(waypoint* wpt) +gmsd_init(Waypoint* wpt) { garmin_fs_t* gmsd = GMSD_FIND(wpt); if (gmsd == NULL) { @@ -1006,7 +1006,7 @@ gmsd_init(waypoint* wpt) /* usage: xcsv_parse_val("-123.34", *waypt, *field_map) */ /*****************************************************************************/ static void -xcsv_parse_val(const char* s, waypoint* wpt, const field_map_t* fmp, +xcsv_parse_val(const char* s, Waypoint* wpt, const field_map_t* fmp, route_head** trk) { const char* enclosure = ""; @@ -1423,7 +1423,7 @@ xcsv_data_read(void) { char* buff; char* s; - waypoint* wpt_tmp; + Waypoint* wpt_tmp; int linecount = 0; queue* elem, *tmp; field_map_t* fmp; @@ -1473,7 +1473,7 @@ xcsv_data_read(void) } if (strlen(buff)) { - wpt_tmp = new waypoint; + wpt_tmp = new Waypoint; s = buff; s = csv_lineparse(s, xcsv_file.field_delimiter, @@ -1579,7 +1579,7 @@ xcsv_resetpathlen(const route_head* head) /* (the output meat) */ /*****************************************************************************/ static void -xcsv_waypt_pr(const waypoint* wpt) +xcsv_waypt_pr(const Waypoint* wpt) { char buff[1024]; const char* write_delimiter; diff --git a/gpsbabel/defs.h b/gpsbabel/defs.h index a85e8d5d2..f6110de4f 100644 --- a/gpsbabel/defs.h +++ b/gpsbabel/defs.h @@ -447,7 +447,7 @@ const global_trait* get_traits(); typedef const char* xg_string; #endif -class waypoint +class Waypoint { private: static geocache_data empty_gc_data; @@ -538,12 +538,12 @@ public: void* extra_data; /* Extra data added by, say, a filter. */ private: - waypoint& operator=(const waypoint& other); + Waypoint& operator=(const Waypoint& other); public: - waypoint(); - ~waypoint(); - waypoint(const waypoint& other); + Waypoint(); + ~Waypoint(); + Waypoint(const Waypoint& other); bool HasUrlLink() const; const UrlLink& GetUrlLink() const; @@ -628,8 +628,8 @@ typedef void (*ff_deinit)(void); typedef void (*ff_read)(void); typedef void (*ff_write)(void); typedef void (*ff_exit)(void); -typedef void (*ff_writeposn)(waypoint*); -typedef waypoint* (*ff_readposn)(posn_status*); +typedef void (*ff_writeposn)(Waypoint*); +typedef Waypoint* (*ff_readposn)(posn_status*); #ifndef DEBUG_MEM char* get_option(const char* iarglist, const char* argname); @@ -644,19 +644,19 @@ typedef void (*filter_process)(void); typedef void (*filter_deinit)(void); typedef void (*filter_exit)(void); -typedef void (*waypt_cb)(const waypoint*); +typedef void (*waypt_cb)(const Waypoint*); typedef void (*route_hdr)(const route_head*); typedef void (*route_trl)(const route_head*); -void waypt_add(waypoint*); -waypoint* waypt_dupe(const waypoint*); -waypoint* waypt_new(void); -void waypt_del(waypoint*); -void waypt_free(waypoint*); +void waypt_add(Waypoint*); +Waypoint* waypt_dupe(const Waypoint*); +Waypoint* waypt_new(void); +void waypt_del(Waypoint*); +void waypt_free(Waypoint*); void waypt_disp_all(waypt_cb); void waypt_disp_session(const session_t* se, waypt_cb cb); void waypt_init_bounds(bounds* bounds); int waypt_bounds_valid(bounds* bounds); -void waypt_add_to_bounds(bounds* bounds, const waypoint* waypointp); +void waypt_add_to_bounds(bounds* bounds, const Waypoint* waypointp); void waypt_compute_bounds(bounds*); double gcgeodist(const double lat1, const double lon1, const double lat2, const double lon2); @@ -664,31 +664,31 @@ void waypt_flush(queue*); void waypt_flush_all(void); unsigned int waypt_count(void); void set_waypt_count(unsigned int nc); -void waypt_add_url(waypoint* wpt, const QString& link, +void waypt_add_url(Waypoint* wpt, const QString& link, const QString& url_link_text); void xcsv_setup_internal_style(const char* style_buf); void xcsv_read_internal_style(const char* style_buf); -waypoint* find_waypt_by_name(const QString& name); +Waypoint* find_waypt_by_name(const QString& name); void waypt_backup(signed int* count, queue** head_bak); void waypt_restore(signed int count, queue* head_bak); -geocache_data* waypt_alloc_gc_data(waypoint* wpt); -int waypt_empty_gc_data(const waypoint* wpt); +geocache_data* waypt_alloc_gc_data(Waypoint* wpt); +int waypt_empty_gc_data(const Waypoint* wpt); geocache_type gs_mktype(const QString& t); geocache_container gs_mkcont(const QString& t); route_head* route_head_alloc(void); -void route_add(waypoint*); -void route_add_wpt(route_head* rte, waypoint* wpt); -void route_add_wpt_named(route_head* rte, waypoint* wpt, const QString& namepart, int number_digits); -void route_del_wpt(route_head* rte, waypoint* wpt); -void track_add_wpt(route_head* rte, waypoint* wpt); -void track_add_wpt_named(route_head* rte, waypoint* wpt, const QString& namepart, int number_digits); -void track_del_wpt(route_head* rte, waypoint* wpt); +void route_add(Waypoint*); +void route_add_wpt(route_head* rte, Waypoint* wpt); +void route_add_wpt_named(route_head* rte, Waypoint* wpt, const QString& namepart, int number_digits); +void route_del_wpt(route_head* rte, Waypoint* wpt); +void track_add_wpt(route_head* rte, Waypoint* wpt); +void track_add_wpt_named(route_head* rte, Waypoint* wpt, const QString& namepart, int number_digits); +void track_del_wpt(route_head* rte, Waypoint* wpt); void route_add_head(route_head* rte); void route_del_head(route_head* rte); void route_reverse(const route_head* rte_hd); -waypoint* route_find_waypt_by_name(route_head* rh, const char* name); +Waypoint* route_find_waypt_by_name(route_head* rh, const char* name); void track_add_head(route_head* rte); void track_del_head(route_head* rte); void track_insert_head(route_head* rte, route_head* predecessor); @@ -749,7 +749,7 @@ short_handle MKSHORT_NEW_HANDLE(DEBUG_PARAMS); #define mkshort( a, b) MKSHORT(a,b,__FILE__, __LINE__) #define mkshort_new_handle() MKSHORT_NEW_HANDLE(__FILE__,__LINE__) #endif -String mkshort_from_wpt(short_handle h, const waypoint* wpt); +String mkshort_from_wpt(short_handle h, const Waypoint* wpt); void mkshort_del_handle(short_handle* h); void setshort_length(short_handle, int n); void setshort_badchars(short_handle, const char*); @@ -876,14 +876,14 @@ extern style_vecs_t style_list[]; void waypt_init(void); void route_init(void); -void waypt_disp(const waypoint*); +void waypt_disp(const Waypoint*); void waypt_status_disp(int total_ct, int myct); -double waypt_time(const waypoint* wpt); -double waypt_speed(const waypoint* A, const waypoint* B); -double waypt_speed_ex(const waypoint* A, const waypoint* B); -double waypt_course(const waypoint* A, const waypoint* B); -double waypt_distance(const waypoint* A, const waypoint* B); -double waypt_distance_ex(const waypoint* A, const waypoint* B); +double waypt_time(const Waypoint* wpt); +double waypt_speed(const Waypoint* A, const Waypoint* B); +double waypt_speed_ex(const Waypoint* A, const Waypoint* B); +double waypt_course(const Waypoint* A, const Waypoint* B); +double waypt_distance(const Waypoint* A, const Waypoint* B); +double waypt_distance_ex(const Waypoint* A, const Waypoint* B); NORETURN fatal(const char*, ...) PRINTFLIKE(1, 2); void is_fatal(const int condition, const char*, ...) PRINTFLIKE(2, 3); @@ -982,7 +982,7 @@ time_t mkgmtime(struct tm* t); gpsbabel::DateTime current_time(void); void dotnet_time_to_time_t(double dotnet, time_t* t, int* ms); signed int month_lookup(const char* m); -const char* get_cache_icon(const waypoint* waypointp); +const char* get_cache_icon(const Waypoint* waypointp); const char* gs_get_cachetype(geocache_type t); const char* gs_get_container(geocache_container t); char* xml_entitize(const char* str); diff --git a/gpsbabel/delbin.cc b/gpsbabel/delbin.cc index fcb2cd450..f4acedaae 100644 --- a/gpsbabel/delbin.cc +++ b/gpsbabel/delbin.cc @@ -152,7 +152,7 @@ static unsigned track_color_index(int bgr); static unsigned waypoint_i; static unsigned waypoint_n; -static waypoint** wp_array; +static Waypoint** wp_array; //----------------------------------------------------------------------------- // Message ids and sizes. Only the needed ones are here. @@ -991,10 +991,10 @@ decode_time(const uint8_t* p) return mkgmtime(&t); } -static waypoint* +static Waypoint* decode_waypoint(const void* data) { - waypoint* wp = new waypoint; + Waypoint* wp = new Waypoint; const msg_waypoint_t* p = (const msg_waypoint_t*)data; const char* s; float f; @@ -1026,7 +1026,7 @@ read_waypoints(void) message_t m; message_t* msg_array; unsigned msg_array_n; - waypoint* wp = NULL; + Waypoint* wp = NULL; unsigned n_point; unsigned notes_i = 0; unsigned notes_max = 0; @@ -1149,7 +1149,7 @@ encode_time(time_t time_, uint8_t* p) } static void -get_gc_notes(const waypoint* wp, int* symbol, char** notes, unsigned* notes_size) +get_gc_notes(const Waypoint* wp, int* symbol, char** notes, unsigned* notes_size) { fs_xml* fs_gpx; xml_tag* root = NULL; @@ -1382,7 +1382,7 @@ add_nuke(nuke_type type) } static void -write_waypoint(const waypoint* wp) +write_waypoint(const Waypoint* wp) { message_t m; msg_waypoint_t* p; @@ -1524,7 +1524,7 @@ write_waypoints(void) // Track reading static void -decode_sat_fix(waypoint* wp, const uint8_t status) +decode_sat_fix(Waypoint* wp, const uint8_t status) { switch (status & 3) { case 1: @@ -1554,7 +1554,7 @@ decode_track_point(const void* data, unsigned* wp_array_i, unsigned max_point) fatal(MYNAME ": read too many track points\n"); } for (i = 0; i < n; i++, j++) { - waypoint* wp = new waypoint; + Waypoint* wp = new Waypoint; float elev = le_read_float(p->point[i].elevation); wp_array[j] = wp; wp->SetCreationTime(decode_time(&p->point[i].year)); @@ -1616,7 +1616,7 @@ read_track(route_head* track) } track->line_color.bbggrr = track_color(p->color[0]); n_point = le_readu32(p->total_points); - wp_array = (waypoint**) xcalloc(n_point, sizeof(*wp_array)); + wp_array = (Waypoint**) xcalloc(n_point, sizeof(*wp_array)); message_free(&msg_array[0]); for (i = 1; i < msg_array_n; i++) { unsigned id = message_get_id(&msg_array[i]); @@ -1731,7 +1731,7 @@ write_track_points(void) unsigned j = 0; do { - const waypoint* wp = wp_array[i]; + const Waypoint* wp = wp_array[i]; float f; if (j == 0) { @@ -1792,14 +1792,14 @@ write_track_begin(const route_head* track) waypoint_i = 0; waypoint_n = track->rte_waypt_ct; if (waypoint_n) { - wp_array = (waypoint**) xmalloc(waypoint_n * sizeof(*wp_array)); + wp_array = (Waypoint**) xmalloc(waypoint_n * sizeof(*wp_array)); } } static void -write_track_point(const waypoint* wp) +write_track_point(const Waypoint* wp) { - wp_array[waypoint_i++] = (waypoint*)wp; + wp_array[waypoint_i++] = (Waypoint*)wp; } static void @@ -1863,7 +1863,7 @@ decode_route_shape(const void* data, unsigned* wp_array_i) for (i = 0; i < n; i++, j++) { char buf[32]; - waypoint* wp = new waypoint; + Waypoint* wp = new Waypoint; wp_array[j] = wp; wp->latitude = delbin_rad2deg(le_read32(p->point[i].latitude)); wp->longitude = delbin_rad2deg(le_read32(p->point[i].longitude)); @@ -1873,13 +1873,13 @@ decode_route_shape(const void* data, unsigned* wp_array_i) *wp_array_i = j; } -static waypoint* +static Waypoint* decode_route_point(const void* data) { const msg_route_point_t* p = (const msg_route_point_t*) data; const char* s = NULL; gbfile* fd = gbfopen(NULL, "w", MYNAME); - waypoint* wp = new waypoint; + Waypoint* wp = new Waypoint; if (p->name[0]) { wp->shortname = p->name; } @@ -1999,7 +1999,7 @@ read_route(route_head* route) route_total = le_readu32(p->total_route_point); shape_total = le_readu32(p->total_shape_point); total = route_total + shape_total; - wp_array = (waypoint**) xcalloc(total, sizeof(*wp_array)); + wp_array = (Waypoint**) xcalloc(total, sizeof(*wp_array)); if (global_opts.debug_level >= DBGLVL_L) { warning(MYNAME ": route '%s' %u points, %u shape points\n", CSTRc(route->rte_name), route_total, shape_total); @@ -2111,7 +2111,7 @@ static unsigned shape_point_n; static unsigned* shape_point_counts; static void -write_route_shape_points(waypoint** array, unsigned n) +write_route_shape_points(Waypoint** array, unsigned n) { message_t m; const unsigned pt_per_msg = 25; @@ -2150,7 +2150,7 @@ write_route_points(void) while (i < waypoint_n) { message_t m; unsigned shape_n; - const waypoint* wp = wp_array[i]; + const Waypoint* wp = wp_array[i]; msg_route_point_t* p; char* s; @@ -2198,15 +2198,15 @@ write_route_begin(const route_head* track) shape_point_n = 0; waypoint_n = track->rte_waypt_ct; if (waypoint_n) { - wp_array = (waypoint**) xmalloc(waypoint_n * sizeof(*wp_array)); + wp_array = (Waypoint**) xmalloc(waypoint_n * sizeof(*wp_array)); shape_point_counts = (unsigned int*) xcalloc(waypoint_n, sizeof(*shape_point_counts)); } } static void -write_route_point(const waypoint* wp) +write_route_point(const Waypoint* wp) { - wp_array[waypoint_i++] = (waypoint*)wp; + wp_array[waypoint_i++] = (Waypoint*)wp; #if NEW_STRINGS if (wp->shortname.startsWith("SHP")) { #else @@ -2262,10 +2262,10 @@ write_routes(void) //----------------------------------------------------------------------------- // Current position -static waypoint* +static Waypoint* decode_navmsg(const void* data) { - waypoint* wp = new waypoint; + Waypoint* wp = new Waypoint; const msg_navigation_t* p = (const msg_navigation_t*) data; struct tm t; @@ -2291,10 +2291,10 @@ decode_navmsg(const void* data) return wp; } -static waypoint* +static Waypoint* read_position(void) { - waypoint* wp; + Waypoint* wp; message_t m; message_init(&m); @@ -2449,7 +2449,7 @@ delbin_write(void) } } -static waypoint* +static Waypoint* delbin_rd_position(posn_status* status) { return read_position(); diff --git a/gpsbabel/delgpl.cc b/gpsbabel/delgpl.cc index e240980f2..18a2d802a 100644 --- a/gpsbabel/delgpl.cc +++ b/gpsbabel/delgpl.cc @@ -54,7 +54,7 @@ gpl_rd_init(const char* fname) static void gpl_read(void) { - waypoint* wpt_tmp; + Waypoint* wpt_tmp; route_head* track_head; gpl_point_t gp; double alt_feet; @@ -63,7 +63,7 @@ gpl_read(void) track_add_head(track_head); while (gbfread(&gp, sizeof(gp), 1, gplfile_in) > 0) { - wpt_tmp = new waypoint; + wpt_tmp = new Waypoint; wpt_tmp->latitude = le_read_double(&gp.lat); wpt_tmp->longitude = le_read_double(&gp.lon); alt_feet = le_read_double(&gp.alt); @@ -122,7 +122,7 @@ gpl_wr_deinit(void) } static void -gpl_trackpt(const waypoint* wpt) +gpl_trackpt(const Waypoint* wpt) { double alt_feet = METERS_TO_FEET(wpt->altitude); int status = 3; diff --git a/gpsbabel/destinator.cc b/gpsbabel/destinator.cc index 379205fe5..cf4291519 100644 --- a/gpsbabel/destinator.cc +++ b/gpsbabel/destinator.cc @@ -50,7 +50,7 @@ static gpsdata_type data_type; /*-----------------------------------------------------------------------------*/ static garmin_fs_t* -gmsd_init(waypoint* wpt) +gmsd_init(Waypoint* wpt) { garmin_fs_t* gmsd = GMSD_FIND(wpt); if (gmsd == NULL) { @@ -151,7 +151,7 @@ read_until_wcstr(const char* str) static void destinator_read_poi(void) { - waypoint* wpt; + Waypoint* wpt; int count = 0; gbfrewind(fin); @@ -172,7 +172,7 @@ destinator_read_poi(void) count++; - wpt = new waypoint; + wpt = new Waypoint; wpt->shortname = read_wcstr(0); wpt->notes = read_wcstr(0); /* comment */ @@ -234,7 +234,7 @@ destinator_read_rte(void) while (!(gbfeof(fin))) { QString str; - waypoint* wpt; + Waypoint* wpt; if (count == 0) { str = read_wcstr(0); @@ -247,7 +247,7 @@ destinator_read_rte(void) count++; - wpt = new waypoint; + wpt = new Waypoint; wpt->shortname = read_wcstr(0); wpt->notes = read_wcstr(0); @@ -286,7 +286,7 @@ destinator_read_trk(void) gbfrewind(fin); while (!(gbfeof(fin))) { - waypoint* wpt; + Waypoint* wpt; struct tm tm; char buff[20]; int date; @@ -297,7 +297,7 @@ destinator_read_trk(void) break; } - wpt = new waypoint; + wpt = new Waypoint; wpt->longitude = gbfgetdbl(fin); wpt->latitude = gbfgetdbl(fin); @@ -386,7 +386,7 @@ destinator_read(void) /*-----------------------------------------------------------------------------*/ static void -destinator_wpt_disp(const waypoint* wpt) +destinator_wpt_disp(const Waypoint* wpt) { garmin_fs_t* gmsd = GMSD_FIND(wpt); @@ -419,7 +419,7 @@ destinator_wpt_disp(const waypoint* wpt) } static void -destinator_trkpt_disp(const waypoint* wpt) +destinator_trkpt_disp(const Waypoint* wpt) { int i; @@ -465,7 +465,7 @@ destinator_trkpt_disp(const waypoint* wpt) } static void -destinator_rtept_disp(const waypoint* wpt) +destinator_rtept_disp(const Waypoint* wpt) { write_wcstr(DST_ITINERARY); #if NEW_STRINGS diff --git a/gpsbabel/dg-100.cc b/gpsbabel/dg-100.cc index b51a39fbe..71d6bb470 100644 --- a/gpsbabel/dg-100.cc +++ b/gpsbabel/dg-100.cc @@ -224,7 +224,7 @@ process_gpsfile(uint8_t data[], route_head** track) const int recordsizes[3] = {8, 20, 32}; int i, style, recsize; int lat, lon, bintime, bindate; - waypoint* wpt; + Waypoint* wpt; /* the first record of each file is always full-sized; its style field * determines the format of all subsequent records in the file */ @@ -266,7 +266,7 @@ process_gpsfile(uint8_t data[], route_head** track) track_add_head(*track); } - wpt = new waypoint; + wpt = new Waypoint; latitude = bin2deg(lat); if (latitude >= 100) { manual_point = 1; diff --git a/gpsbabel/discard.cc b/gpsbabel/discard.cc index 5ebe298a0..6b99c39a1 100644 --- a/gpsbabel/discard.cc +++ b/gpsbabel/discard.cc @@ -80,13 +80,13 @@ arglist_t fix_args[] = { * Decide whether to keep or toss this point. */ static void -fix_process_wpt(const waypoint* wpt) +fix_process_wpt(const Waypoint* wpt) { int del = 0; int delh = 0; int delv = 0; - waypoint* waypointp = (waypoint*) wpt; + Waypoint* waypointp = (Waypoint*) wpt; if ((hdopf >= 0.0) && (waypointp->hdop > hdopf)) { delh = 1; diff --git a/gpsbabel/dmtlog.cc b/gpsbabel/dmtlog.cc index ef27bb95f..de6dfa082 100644 --- a/gpsbabel/dmtlog.cc +++ b/gpsbabel/dmtlog.cc @@ -37,7 +37,7 @@ static gbfile* fin, *fout; static char* xmlbin; -static waypoint* xmlwpt; +static Waypoint* xmlwpt; static route_head* xmltrk; static QString xmlgrid; static int xmldatum; @@ -107,7 +107,7 @@ static xg_tag_mapping tlog3b_xgcb_map[] = { /* helpers */ static void -convert_datum(waypoint* wpt, int datum) +convert_datum(Waypoint* wpt, int datum) { if (datum != DATUM_WGS84) { double lat = wpt->latitude; @@ -121,7 +121,7 @@ convert_datum(waypoint* wpt, int datum) static void -finalize_pt(waypoint* wpt) +finalize_pt(Waypoint* wpt) { if (xmlgrid == "BNG") { GPS_Math_NGENToAiry1830LatLon(xmlEasting, xmlNorthing, @@ -253,7 +253,7 @@ tlog3b_xgcb_tfdes(xg_string args, const QXmlStreamAttributes* unused) static void tlog3b_xgcb_wptst(xg_string args, const QXmlStreamAttributes* unused) { - xmlwpt = new waypoint; + xmlwpt = new Waypoint; xmldatum = DATUM_WGS84; } @@ -261,7 +261,7 @@ tlog3b_xgcb_wptst(xg_string args, const QXmlStreamAttributes* unused) static void tlog3b_xgcb_tptst(xg_string args, const QXmlStreamAttributes* unused) { - xmlwpt = new waypoint; + xmlwpt = new Waypoint; xmldatum = DATUM_WGS84; } @@ -473,7 +473,7 @@ read_CTrackFile(const int version) } while (tcount > 0) { - waypoint* wpt; + Waypoint* wpt; tcount--; @@ -481,7 +481,7 @@ read_CTrackFile(const int version) datum = read_datum(fin); } - wpt = new waypoint; + wpt = new Waypoint; wpt->latitude = gbfgetdbl(fin); wpt->longitude = gbfgetdbl(fin); @@ -517,7 +517,7 @@ read_CTrackFile(const int version) } while (! gbfeof(fin)) { - waypoint* wpt; + Waypoint* wpt; i = gbfgetc(fin); if (i == 0) { @@ -527,7 +527,7 @@ read_CTrackFile(const int version) gbfungetc(i, fin); datum = read_datum(fin); - wpt = new waypoint; + wpt = new Waypoint; wpt->latitude = gbfgetdbl(fin); wpt->longitude = gbfgetdbl(fin); @@ -552,12 +552,12 @@ read_CTrackFile(const int version) datum = read_datum(fin); while (wcount > 0) { - waypoint* wpt; + Waypoint* wpt; int32_t namect, i; wcount--; - wpt = new waypoint; + wpt = new Waypoint; wpt->latitude = gbfgetdbl(fin); wpt->longitude = gbfgetdbl(fin); @@ -797,7 +797,7 @@ track_tlr_cb(const route_head* trk) } static void -track_wpt_cb(const waypoint* wpt) +track_wpt_cb(const Waypoint* wpt) { if (this_index != track_index) { return; @@ -809,7 +809,7 @@ track_wpt_cb(const waypoint* wpt) } static void -wpt_cb(const waypoint* wpt) +wpt_cb(const Waypoint* wpt) { int names; diff --git a/gpsbabel/duplicate.cc b/gpsbabel/duplicate.cc index 338ca5cfd..b04c3f85d 100644 --- a/gpsbabel/duplicate.cc +++ b/gpsbabel/duplicate.cc @@ -53,7 +53,7 @@ arglist_t dup_args[] = { typedef struct btree_node { struct btree_node* left, *right; unsigned long data; - waypoint* wpt; + Waypoint* wpt; } btree_node; static btree_node* @@ -107,7 +107,7 @@ free_tree(btree_node* tree) } typedef struct { - waypoint* wpt; + Waypoint* wpt; int index; } wpt_ptr; @@ -174,7 +174,7 @@ compare(const void* a, const void* b) static void duplicate_process(void) { - waypoint* waypointp; + Waypoint* waypointp; btree_node* newnode, * btmp, * sup_tree = NULL; btree_node* oldnode = NULL; unsigned long crc = 0; @@ -183,7 +183,7 @@ duplicate_process(void) char lat[13]; char lon[13]; } dupe; - waypoint* delwpt = NULL; + Waypoint* delwpt = NULL; int i, ct = waypt_count(); wpt_ptr* htable, *bh; @@ -194,7 +194,7 @@ duplicate_process(void) i = 0; QUEUE_FOR_EACH(&waypt_head, elem, tmp) { - bh->wpt = (waypoint*) elem; + bh->wpt = (Waypoint*) elem; bh->index = i; i ++; bh ++; diff --git a/gpsbabel/easygps.cc b/gpsbabel/easygps.cc index 52fa6acc1..b5986c379 100644 --- a/gpsbabel/easygps.cc +++ b/gpsbabel/easygps.cc @@ -81,9 +81,9 @@ data_read(void) char ibuf[10]; do { unsigned char tag; - waypoint* wpt_tmp; + Waypoint* wpt_tmp; - wpt_tmp = new waypoint; + wpt_tmp = new Waypoint; UrlLink link; for (tag = gbfgetc(file_in); tag != 0xff; tag = gbfgetc(file_in)) { @@ -153,7 +153,7 @@ data_read(void) static void -ez_disp(const waypoint* wpt) +ez_disp(const Waypoint* wpt) { gbfputc('W', file_out); #if NEW_STRINGS diff --git a/gpsbabel/enigma.cc b/gpsbabel/enigma.cc index 7272fa4f3..9ccec1f28 100644 --- a/gpsbabel/enigma.cc +++ b/gpsbabel/enigma.cc @@ -108,7 +108,7 @@ data_read(void) route_add_head(route); while (1 == gbfread(&ewpt, sizeof(ewpt), 1, file_in)) { - waypoint* wpt = new waypoint; + Waypoint* wpt = new Waypoint; wpt->latitude = enigmaPositionToDec(le_read32(&ewpt.latitude)); wpt->longitude = enigmaPositionToDec(le_read32(&ewpt.longitude)); char*sn = xstrndup(ewpt.shortname, ewpt.shortname_len); @@ -167,7 +167,7 @@ wr_init(const char* fname) #endif static void -enigma_waypt_disp(const waypoint* wpt) +enigma_waypt_disp(const Waypoint* wpt) { struct enigma_wpt ewpt; diff --git a/gpsbabel/exif.cc b/gpsbabel/exif.cc index 8eb739744..3615120e6 100644 --- a/gpsbabel/exif.cc +++ b/gpsbabel/exif.cc @@ -134,7 +134,7 @@ typedef struct exif_app_s { static gbfile* fin, *fout; static queue exif_apps; static exif_app_t* exif_app; -const waypoint* exif_wpt_ref; +const Waypoint* exif_wpt_ref; time_t exif_time_ref; static char exif_success; static char* exif_fout_name; @@ -670,10 +670,10 @@ exif_get_exif_time(exif_app_t* app) return res.toTime_t(); } -static waypoint* +static Waypoint* exif_waypt_from_exif_app(exif_app_t* app) { - waypoint* wpt; + Waypoint* wpt; queue* elem, *tmp; exif_ifd_t* ifd; exif_tag_t* tag; @@ -693,7 +693,7 @@ exif_waypt_from_exif_app(exif_app_t* app) return NULL; } - wpt = new waypoint; + wpt = new Waypoint; wpt->latitude = unknown_alt; wpt->longitude = unknown_alt; @@ -1095,7 +1095,7 @@ exif_remove_tag(const int ifd_nr, const int tag_id) } static void -exif_find_wpt_by_time(const waypoint* wpt) +exif_find_wpt_by_time(const Waypoint* wpt) { if (!wpt->creation_time.isValid()) { return; @@ -1109,7 +1109,7 @@ exif_find_wpt_by_time(const waypoint* wpt) } static void -exif_find_wpt_by_name(const waypoint* wpt) +exif_find_wpt_by_name(const Waypoint* wpt) { if (exif_wpt_ref != NULL) { return; @@ -1354,7 +1354,7 @@ static void exif_read(void) { uint16_t soi; - waypoint* wpt; + Waypoint* wpt; soi = gbfgetuint16(fin); is_fatal(soi != 0xFFD8, MYNAME ": Unknown image file."); /* only jpeg for now */ @@ -1465,7 +1465,7 @@ exif_write(void) } if (exif_wpt_ref != NULL) { - const waypoint* wpt = exif_wpt_ref; + const Waypoint* wpt = exif_wpt_ref; exif_put_long(IFD0, IFD0_TAG_GPS_IFD_OFFS, 0, 0); exif_put_value(GPS_IFD, GPS_IFD_TAG_VERSION, EXIF_TYPE_BYTE, 4, 0, writer_gps_tag_version); diff --git a/gpsbabel/filterdefs.h b/gpsbabel/filterdefs.h index 9650a2467..c05e07688 100644 --- a/gpsbabel/filterdefs.h +++ b/gpsbabel/filterdefs.h @@ -28,7 +28,7 @@ extern queue waypt_head; #if NEWQ -extern QList waypt_list; +extern QList waypt_list; #endif typedef struct filter_vecs { diff --git a/gpsbabel/g7towin.cc b/gpsbabel/g7towin.cc index 2121de355..3c1ee51a0 100644 --- a/gpsbabel/g7towin.cc +++ b/gpsbabel/g7towin.cc @@ -70,7 +70,7 @@ arglist_t g7towin_args[] = { #define WPT_cD_OFS 0x0cD00 static void -parse_line(char* buff, int index, const char* delimiter, waypoint* wpt) +parse_line(char* buff, int index, const char* delimiter, Waypoint* wpt) { char* cin; garmin_fs_p gmsd = GMSD_FIND(wpt); @@ -264,16 +264,16 @@ parse_line(char* buff, int index, const char* delimiter, waypoint* wpt) } } -static waypoint* +static Waypoint* parse_waypt(char* buff) { char* cin, *cerr; int i; struct tm tm; - waypoint* wpt; + Waypoint* wpt; garmin_fs_p gmsd; - wpt = new waypoint; + wpt = new Waypoint; gmsd = garmin_fs_alloc(-1); fs_chain_add(&wpt->fs, (format_specific_data*) gmsd); @@ -341,13 +341,13 @@ parse_waypt(char* buff) return wpt; } -static waypoint* +static Waypoint* parse_trkpt(char* buff) { garmin_fs_p gmsd; - waypoint* wpt; + Waypoint* wpt; - wpt = new waypoint; + wpt = new Waypoint; gmsd = garmin_fs_alloc(-1); fs_chain_add(&wpt->fs, (format_specific_data*) gmsd); @@ -409,8 +409,8 @@ data_read(void) { char* buff; int line = 0; - waypoint* wpt = NULL; - waypoint* prev = NULL; + Waypoint* wpt = NULL; + Waypoint* prev = NULL; route_head* head = NULL; while ((buff = gbfgetstr(fin))) { @@ -459,7 +459,7 @@ data_read(void) break; case 'I': /* event point */ - wpt = new waypoint; + wpt = new Waypoint; cdata += parse_coordinates(cdata, datum, grid, &wpt->latitude, &wpt->longitude, MYNAME); xasprintf(&wpt->shortname, "Event%d", ++event_ct); diff --git a/gpsbabel/garmin.cc b/gpsbabel/garmin.cc index 3e17716dd..677f1d3ad 100644 --- a/gpsbabel/garmin.cc +++ b/gpsbabel/garmin.cc @@ -338,7 +338,7 @@ waypt_read(void) GPS_PWay* way = NULL; if (getposn) { - waypoint* wpt = new waypoint; + Waypoint* wpt = new Waypoint; wpt->latitude = gps_save_lat; wpt->longitude = gps_save_lon; wpt->shortname = "Position"; @@ -354,7 +354,7 @@ waypt_read(void) } for (i = 0; i < n; i++) { - waypoint* wpt_tmp = new waypoint; + Waypoint* wpt_tmp = new Waypoint; wpt_tmp->shortname = way[i]->ident; wpt_tmp->description = QString(way[i]->cmnt).simplified(); @@ -406,7 +406,7 @@ static int lap_read_nop_cb(int n, struct GPS_SWay** dp) // returns 1 if the waypoint's start_time can be found // in the laps array, 0 otherwise -unsigned int checkWayPointIsAtSplit(waypoint* wpt, GPS_PLap* laps, int nlaps) +unsigned int checkWayPointIsAtSplit(Waypoint* wpt, GPS_PLap* laps, int nlaps) { int result = 0; @@ -459,7 +459,7 @@ track_read(void) } for (i = 0; i < ntracks; i++) { - waypoint* wpt; + Waypoint* wpt; /* * This is probably always in slot zero, but the Garmin @@ -491,7 +491,7 @@ track_read(void) if (array[i]->no_latlon || array[i]->ishdr) { continue; } - wpt = new waypoint; + wpt = new Waypoint; wpt->longitude = array[i]->lon; wpt->latitude = array[i]->lat; @@ -563,7 +563,7 @@ route_read(void) if (array[i]->islink) { continue; } else { - waypoint* wpt_tmp = new waypoint; + Waypoint* wpt_tmp = new Waypoint; wpt_tmp->latitude = array[i]->lat; wpt_tmp->longitude = array[i]->lon; wpt_tmp->shortname = array[i]->ident; @@ -595,7 +595,7 @@ lap_read_as_track(void) return; } for (i = 0; i < ntracks; i++) { - waypoint* wpt; + Waypoint* wpt; if (array[i]->index == -1) { index=i; } else { @@ -618,7 +618,7 @@ lap_read_as_track(void) trk_head->rte_name = tbuf; track_add_head(trk_head); - wpt = new waypoint; + wpt = new Waypoint; wpt->longitude = array[i]->begin_lon; wpt->latitude = array[i]->begin_lat; @@ -641,7 +641,7 @@ lap_read_as_track(void) * continue; * } */ - wpt = new waypoint; + wpt = new Waypoint; wpt->longitude = array[i]->end_lon; wpt->latitude = array[i]->end_lat; @@ -674,7 +674,7 @@ lap_read_as_track(void) * to the data type we use throughout. Yes, we do lose some data that way. */ static void -pvt2wpt(GPS_PPvt_Data pvt, waypoint* wpt) +pvt2wpt(GPS_PPvt_Data pvt, Waypoint* wpt) { double wptime, wptimes; @@ -746,10 +746,10 @@ pvt_init(const char* fname) GPS_Command_Pvt_On(fname, &pvt_fd); } -static waypoint* +static Waypoint* pvt_read(posn_status* posn_status) { - waypoint* wpt = new waypoint; + Waypoint* wpt = new Waypoint; GPS_PPvt_Data pvt = GPS_Pvt_New(); if (GPS_Command_Pvt_Get(&pvt_fd, &pvt)) { @@ -852,7 +852,7 @@ waypt_write_cb(GPS_PWay* way) * description. */ const char* -get_gc_info(waypoint* wpt) +get_gc_info(Waypoint* wpt) { if (global_opts.smart_names) { if (wpt->gc_data->type == gt_virtual) { @@ -898,11 +898,11 @@ waypoint_prepare(void) i = 0; QUEUE_FOR_EACH(&waypt_head, elem, tmp) { - waypoint* wpt; + Waypoint* wpt; char* ident; char obuf[256]; - wpt = (waypoint*) elem; + wpt = (Waypoint*) elem; #if NEW_STRINGS QString src; if (!wpt->description.isEmpty()) { @@ -1048,7 +1048,7 @@ route_hdr_pr(const route_head* rte) } static void -route_waypt_pr(const waypoint* wpt) +route_waypt_pr(const Waypoint* wpt) { GPS_PWay rte = *cur_tx_routelist_entry; @@ -1158,7 +1158,7 @@ track_hdr_pr(const route_head* trk_head) } static void -track_waypt_pr(const waypoint* wpt) +track_waypt_pr(const Waypoint* wpt) { (*cur_tx_tracklist_entry)->lat = wpt->latitude; (*cur_tx_tracklist_entry)->lon = wpt->longitude; diff --git a/gpsbabel/garmin_fit.cc b/gpsbabel/garmin_fit.cc index 03c629f26..8370acb05 100644 --- a/gpsbabel/garmin_fit.cc +++ b/gpsbabel/garmin_fit.cc @@ -287,7 +287,7 @@ fit_parse_data(fit_message_def* def, int time_offset) uint16_t power = 0xffff; int8_t temperature = 0x7f; int i; - waypoint* waypt; + Waypoint* waypt; if (global_opts.debug_level >= 7) { debug_print(7,"%s: parsing fit data ID %d with num_fields=%d\n", MYNAME, def->global_id, def->num_fields); @@ -380,7 +380,7 @@ fit_parse_data(fit_message_def* def, int time_offset) break; } - waypt = new waypoint; + waypt = new Waypoint; waypt->latitude = (lat / (double)0x7fffffff) * 180; waypt->longitude = (lon / (double)0x7fffffff) * 180; if (alt != 0xffff) { diff --git a/gpsbabel/garmin_fs.cc b/gpsbabel/garmin_fs.cc index 59fae1780..ab767630f 100644 --- a/gpsbabel/garmin_fs.cc +++ b/gpsbabel/garmin_fs.cc @@ -178,7 +178,7 @@ void garmin_fs_convert(void* fs) /* GPX - out */ void -garmin_fs_xml_fprint(const waypoint* waypt, +garmin_fs_xml_fprint(const Waypoint* waypt, QXmlStreamWriter* writer) { const char* phone, *addr; @@ -284,7 +284,7 @@ garmin_fs_xml_fprint(const waypoint* waypt, } void -garmin_fs_xml_convert(const int base_tag, int tag, const QString& Qcdatastr, waypoint* waypt) +garmin_fs_xml_convert(const int base_tag, int tag, const QString& Qcdatastr, Waypoint* waypt) { garmin_fs_t* gmsd; // FIXME: eliminate C string copy/use here: @@ -402,7 +402,7 @@ garmin_fs_convert_category(const char* category_name, uint16_t* category) } unsigned char -garmin_fs_merge_category(const char* category_name, waypoint* waypt) +garmin_fs_merge_category(const char* category_name, Waypoint* waypt) { uint16_t cat; garmin_fs_t* gmsd; @@ -424,7 +424,7 @@ garmin_fs_merge_category(const char* category_name, waypoint* waypt) } void -garmin_fs_garmin_after_read(const GPS_PWay way, waypoint* wpt, const int protoid) +garmin_fs_garmin_after_read(const GPS_PWay way, Waypoint* wpt, const int protoid) { garmin_fs_t* gmsd = NULL; @@ -459,7 +459,7 @@ garmin_fs_garmin_after_read(const GPS_PWay way, waypoint* wpt, const int protoid } void -garmin_fs_garmin_before_write(const waypoint* wpt, GPS_PWay way, const int protoid) +garmin_fs_garmin_before_write(const Waypoint* wpt, GPS_PWay way, const int protoid) { garmin_fs_t* gmsd = GMSD_FIND(wpt); diff --git a/gpsbabel/garmin_fs.h b/gpsbabel/garmin_fs.h index e38193403..42c4a6c8e 100644 --- a/gpsbabel/garmin_fs.h +++ b/gpsbabel/garmin_fs.h @@ -122,9 +122,9 @@ void garmin_fs_convert(void* fs); char* garmin_fs_xstrdup(const char* src, size_t size); /* for GPX */ -void garmin_fs_xml_convert(const int base_tag, int tag, const QString& cdatastr, waypoint* waypt); +void garmin_fs_xml_convert(const int base_tag, int tag, const QString& cdatastr, Waypoint* waypt); class QXmlStreamWriter; -void garmin_fs_xml_fprint(const waypoint* waypt, QXmlStreamWriter*); +void garmin_fs_xml_fprint(const Waypoint* waypt, QXmlStreamWriter*); /* common garmin_fs utilities */ @@ -132,11 +132,11 @@ void garmin_fs_xml_fprint(const waypoint* waypt, QXmlStreamWriter*); unsigned char garmin_fs_convert_category(const char* category_name, uint16_t* category); /* ..merge_category: returns 1=OK; 0=Unable to convert category */ -unsigned char garmin_fs_merge_category(const char* category_name, waypoint* waypt); +unsigned char garmin_fs_merge_category(const char* category_name, Waypoint* waypt); #define GMSD_SECTION_CATEGORIES "Garmin Categories" -void garmin_fs_garmin_after_read(const GPS_PWay way, waypoint* wpt, const int protoid); -void garmin_fs_garmin_before_write(const waypoint* wpt, GPS_PWay way, const int protoid); +void garmin_fs_garmin_after_read(const GPS_PWay way, Waypoint* wpt, const int protoid); +void garmin_fs_garmin_before_write(const Waypoint* wpt, GPS_PWay way, const int protoid); #endif diff --git a/gpsbabel/garmin_gpi.cc b/gpsbabel/garmin_gpi.cc index 316496be9..7217bd8a1 100644 --- a/gpsbabel/garmin_gpi.cc +++ b/gpsbabel/garmin_gpi.cc @@ -222,7 +222,7 @@ static time_t gpi_timestamp = 0; /* look for or initialize GMSD */ static garmin_fs_t* -gpi_gmsd_init(waypoint* wpt) +gpi_gmsd_init(Waypoint* wpt) { garmin_fs_t* gmsd = GMSD_FIND(wpt); if (wpt == NULL) { @@ -363,7 +363,7 @@ read_header(void) } /* gpi tag handler */ -static int read_tag(const char* caller, const int tag, waypoint* wpt); +static int read_tag(const char* caller, const int tag, Waypoint* wpt); /* read a single poi with all options */ @@ -371,7 +371,7 @@ static void read_poi(const int sz, const int tag) { int pos, len; - waypoint* wpt; + Waypoint* wpt; #ifdef GPI_DBG PP; @@ -388,7 +388,7 @@ read_poi(const int sz, const int tag) (void) len; pos = gbftell(fin); - wpt = new waypoint; + wpt = new Waypoint; wpt->icon_descr = DEFAULT_ICON; wpt->latitude = GPS_Math_Semi_To_Deg(gbfgetint32(fin)); @@ -510,7 +510,7 @@ read_poi_group(const int sz, const int tag) // length field) /* gpi tag handler */ static int -read_tag(const char* caller, const int tag, waypoint* wpt) +read_tag(const char* caller, const int tag, Waypoint* wpt) { int pos, sz, dist; double speed; @@ -762,8 +762,8 @@ write_string(const QString& str, const char long_format) static int compare_wpt_cb(const queue* a, const queue* b) { - const waypoint* wa = (waypoint*) a; - const waypoint* wb = (waypoint*) b; + const Waypoint* wa = (Waypoint*) a; + const Waypoint* wb = (Waypoint*) b; #if NEW_STRINGS return wa->shortname.compare(wb->shortname); #else @@ -815,7 +815,7 @@ wdata_free(writer_data_t* data) queue* elem, *tmp; QUEUE_FOR_EACH(&data->Q, elem, tmp) { - waypoint* wpt = (waypoint*)elem; + Waypoint* wpt = (Waypoint*)elem; if (wpt->extra_data) { gpi_waypt_t* dt = (gpi_waypt_t*) wpt->extra_data; @@ -845,7 +845,7 @@ wdata_free(writer_data_t* data) static void -wdata_add_wpt(writer_data_t* data, waypoint* wpt) +wdata_add_wpt(writer_data_t* data, Waypoint* wpt) { data->ct++; ENQUEUE_TAIL(&data->Q, &wpt->Q); @@ -873,7 +873,7 @@ wdata_check(writer_data_t* data) center_lat = center_lon = 0; QUEUE_FOR_EACH(&data->Q, elem, tmp) { - waypoint* wpt = (waypoint*) elem; + Waypoint* wpt = (Waypoint*) elem; center_lat += wpt->latitude; center_lon += wpt->longitude; } @@ -881,7 +881,7 @@ wdata_check(writer_data_t* data) center_lon /= data->ct; QUEUE_FOR_EACH(&data->Q, elem, tmp) { - waypoint* wpt = (waypoint*) elem; + Waypoint* wpt = (Waypoint*) elem; writer_data_t** ref; if (wpt->latitude < center_lat) { @@ -932,7 +932,7 @@ wdata_compute_size(writer_data_t* data) res = 23; /* bounds, ... of tag 0x80008 */ QUEUE_FOR_EACH(&data->Q, elem, tmp) { - waypoint* wpt = (waypoint*) elem; + Waypoint* wpt = (Waypoint*) elem; gpi_waypt_t* dt; garmin_fs_t* gmsd; QString str; @@ -1095,7 +1095,7 @@ wdata_write(const writer_data_t* data) QUEUE_FOR_EACH(&data->Q, elem, tmp) { QString str; int s0, s1; - waypoint* wpt = (waypoint*)elem; + Waypoint* wpt = (Waypoint*)elem; gpi_waypt_t* dt = (gpi_waypt_t*) wpt->extra_data; str = wpt->description; @@ -1282,13 +1282,13 @@ write_header(void) static void -enum_waypt_cb(const waypoint* ref) +enum_waypt_cb(const Waypoint* ref) { - waypoint* wpt; + Waypoint* wpt; queue* elem, *tmp; QUEUE_FOR_EACH(&wdata->Q, elem, tmp) { - waypoint* cmp = (waypoint*) elem; + Waypoint* cmp = (Waypoint*) elem; /* sort out nearly equal waypoints */ if ((compare_strings(cmp->shortname, ref->shortname) == 0) && @@ -1300,7 +1300,7 @@ enum_waypt_cb(const waypoint* ref) } } - wpt = new waypoint(*ref); + wpt = new Waypoint(*ref); if (*opt_unique == '1') { #if NEW_STRINGS diff --git a/gpsbabel/garmin_txt.cc b/gpsbabel/garmin_txt.cc index 59edaaf68..0e624c7e4 100644 --- a/gpsbabel/garmin_txt.cc +++ b/gpsbabel/garmin_txt.cc @@ -52,7 +52,7 @@ static gbfile* fin, *fout; static route_head* current_trk, *current_rte; static int waypoints; static int routepoints; -static waypoint** wpt_a; +static Waypoint** wpt_a; static int wpt_a_ct; static grid_type grid_index; static int datum_index; @@ -130,9 +130,9 @@ typedef struct info_s { double speed; double total; int count; - waypoint* prev_wpt; - waypoint* first_wpt; - waypoint* last_wpt; + Waypoint* prev_wpt; + Waypoint* first_wpt; + Waypoint* last_wpt; } info_t; static info_t* route_info; @@ -177,7 +177,7 @@ init_date_and_time_format(void) } static void -convert_datum(const waypoint* wpt, double* dest_lat, double* dest_lon) +convert_datum(const Waypoint* wpt, double* dest_lat, double* dest_lon) { double alt; @@ -193,7 +193,7 @@ convert_datum(const waypoint* wpt, double* dest_lat, double* dest_lon) /* Waypoint preparation */ static void -enum_waypt_cb(const waypoint* wpt) +enum_waypt_cb(const Waypoint* wpt) { garmin_fs_p gmsd; int wpt_class; @@ -208,15 +208,15 @@ enum_waypt_cb(const waypoint* wpt) return; } for (i = 0; i < wpt_a_ct; i++) { /* check for duplicates */ - waypoint* tmp = wpt_a[i]; + Waypoint* tmp = wpt_a[i]; if (case_ignore_strcmp(tmp->shortname, wpt->shortname) == 0) { - wpt_a[i] = (waypoint*)wpt; + wpt_a[i] = (Waypoint*)wpt; waypoints--; return; } } - wpt_a[wpt_a_ct++] = (waypoint*)wpt; + wpt_a[wpt_a_ct++] = (Waypoint*)wpt; } } @@ -224,8 +224,8 @@ enum_waypt_cb(const waypoint* wpt) static int sort_waypt_cb(const void* a, const void* b) { - const waypoint* wa = *(waypoint**)a; - const waypoint* wb = *(waypoint**)b; + const Waypoint* wa = *(Waypoint**)a; + const Waypoint* wb = *(Waypoint**)b; #if NEW_STRINGS return wa->shortname.compare(wb->shortname, Qt::CaseInsensitive); #else @@ -253,18 +253,18 @@ prework_tlr_cb(const route_head* rte) } static void -prework_wpt_cb(const waypoint* wpt) +prework_wpt_cb(const Waypoint* wpt) { - waypoint* prev = cur_info->prev_wpt; + Waypoint* prev = cur_info->prev_wpt; if (prev != NULL) { cur_info->time += (wpt->GetCreationTime().toTime_t() - prev->GetCreationTime().toTime_t()); cur_info->length += waypt_distance_ex(prev, wpt); } else { - cur_info->first_wpt = (waypoint*)wpt; + cur_info->first_wpt = (Waypoint*)wpt; cur_info->start = wpt->GetCreationTime().toTime_t(); } - cur_info->prev_wpt = (waypoint*)wpt; + cur_info->prev_wpt = (Waypoint*)wpt; cur_info->count++; routepoints++; } @@ -273,7 +273,7 @@ prework_wpt_cb(const waypoint* wpt) /* output helpers */ static void -print_position(const waypoint* wpt) +print_position(const Waypoint* wpt) { int valid = 1; double lat, lon, north, east; @@ -427,7 +427,7 @@ print_categories(uint16_t categories) } static void -print_course(const waypoint* A, const waypoint* B) /* seems to be okay */ +print_course(const Waypoint* A, const Waypoint* B) /* seems to be okay */ { if ((A != NULL) && (B != NULL) && (A != B)) { int course; @@ -540,7 +540,7 @@ print_string(const char* fmt, const QString& string) /* main cb's */ static void -write_waypt(const waypoint* wpt) +write_waypt(const Waypoint* wpt) { unsigned char wpt_class; garmin_fs_p gmsd; @@ -679,9 +679,9 @@ route_disp_tlr_cb(const route_head* rte) } static void -route_disp_wpt_cb(const waypoint* wpt) +route_disp_wpt_cb(const Waypoint* wpt) { - waypoint* prev = cur_info->prev_wpt; + Waypoint* prev = cur_info->prev_wpt; gbfprintf(fout, "Route Waypoint\t"); gbfprintf(fout, "%s\t", CSTRc(wpt->shortname)); @@ -698,7 +698,7 @@ route_disp_wpt_cb(const waypoint* wpt) gbfprintf(fout, "\r\n"); - cur_info->prev_wpt = (waypoint*)wpt; + cur_info->prev_wpt = (Waypoint*)wpt; } static void @@ -736,9 +736,9 @@ track_disp_tlr_cb(const route_head* track) } static void -track_disp_wpt_cb(const waypoint* wpt) +track_disp_wpt_cb(const Waypoint* wpt) { - waypoint* prev = cur_info->prev_wpt; + Waypoint* prev = cur_info->prev_wpt; time_t delta; double dist, depth; @@ -773,7 +773,7 @@ track_disp_wpt_cb(const waypoint* wpt) } gbfprintf(fout, "\r\n"); - cur_info->prev_wpt = (waypoint*)wpt; + cur_info->prev_wpt = (Waypoint*)wpt; } /******************************************************************************* @@ -869,14 +869,14 @@ garmin_txt_write(void) int i; wpt_a_ct = 0; - wpt_a = (waypoint**)xcalloc(waypoints, sizeof(*wpt_a)); + wpt_a = (Waypoint**)xcalloc(waypoints, sizeof(*wpt_a)); waypt_disp_all(enum_waypt_cb); route_disp_all(NULL, NULL, enum_waypt_cb); qsort(wpt_a, waypoints, sizeof(*wpt_a), sort_waypt_cb); gbfprintf(fout, "Header\t%s\r\n\r\n", headers[waypt_header]); for (i = 0; i < waypoints; i++) { - waypoint* wpt = wpt_a[i]; + Waypoint* wpt = wpt_a[i]; write_waypt(wpt); } xfree(wpt_a); @@ -1136,12 +1136,12 @@ parse_waypoint(void) { char* str; int column = -1; - waypoint* wpt; + Waypoint* wpt; garmin_fs_p gmsd = NULL; bind_fields(waypt_header); - wpt = new waypoint; + wpt = new Waypoint; gmsd = garmin_fs_alloc(-1); fs_chain_add(&wpt->fs, (format_specific_data*) gmsd); @@ -1289,7 +1289,7 @@ parse_route_waypoint(void) { char* str; int column = -1; - waypoint* wpt = NULL; + Waypoint* wpt = NULL; bind_fields(rtept_header); @@ -1300,7 +1300,7 @@ parse_route_waypoint(void) is_fatal((*str == '\0'), MYNAME ": Route waypoint without name at line %d!\n", current_line); wpt = find_waypt_by_name(str); is_fatal((wpt == NULL), MYNAME ": Route waypoint \"%s\" not in waypoint list (line %d)!\n", str, current_line); - wpt = new waypoint(*wpt); + wpt = new Waypoint(*wpt); break; } } @@ -1314,10 +1314,10 @@ parse_track_waypoint(void) { char* str; int column = -1; - waypoint* wpt; + Waypoint* wpt; bind_fields(trkpt_header); - wpt = new waypoint; + wpt = new Waypoint; while ((str = csv_lineparse(NULL, "\t", "", column++))) { int field_no; diff --git a/gpsbabel/garmin_xt.cc b/gpsbabel/garmin_xt.cc index c98623761..677fc4dba 100644 --- a/gpsbabel/garmin_xt.cc +++ b/gpsbabel/garmin_xt.cc @@ -255,7 +255,7 @@ format_garmin_xt_proc_strk(void) // Process all tracks one by one while ((TracksCompleted < NumberOfTracks) && (!gbfeof(fin))) { route_head* tmp_track; - waypoint* wpt; + Waypoint* wpt; char* trk_name; trk_name = (char*) xmalloc(30); @@ -293,7 +293,7 @@ format_garmin_xt_proc_strk(void) // Add point to the track if not the first point if (!FirstCoo) { //create new waypoint - wpt = new waypoint; + wpt = new Waypoint; //populate wpt; wpt->latitude = PrevLat; /* Degrees */ @@ -319,7 +319,7 @@ format_garmin_xt_proc_strk(void) format_garmin_xt_decomp_last_ele(Count, &PrevEle, TrackBlock); //create new waypoint - wpt = new waypoint; + wpt = new Waypoint; //populate wpt; wpt->latitude = PrevLat; /* Degrees */ @@ -342,7 +342,7 @@ format_garmin_xt_proc_atrk(void) uint32_t Lat=0, Lon=0; uint32_t Tim=0; double LatF = 0, LonF = 0, AltF = 0; - waypoint* wpt; + Waypoint* wpt; int method = 0; unsigned char buf[3]; int32_t num_trackpoints; @@ -391,7 +391,7 @@ format_garmin_xt_proc_atrk(void) AltF = (double)uu * GARMIN_XT_ELE - 1500; //create new waypoint - wpt = new waypoint; + wpt = new Waypoint; //populate wpt; wpt->latitude = LatF*180/16777216; /* Degrees */ diff --git a/gpsbabel/gdb.cc b/gpsbabel/gdb.cc index 1f4c1ba8a..08582b12d 100644 --- a/gpsbabel/gdb.cc +++ b/gpsbabel/gdb.cc @@ -147,7 +147,7 @@ gdb_flush_waypt_queue(queue* Q) queue* elem, *tmp; QUEUE_FOR_EACH(Q, elem, tmp) { - waypoint* wpt = (waypoint*)elem; + Waypoint* wpt = (Waypoint*)elem; dequeue(elem); if (wpt->extra_data) { #if NEW_STRINGS @@ -330,8 +330,8 @@ gdb_fread_strlist(void) return qres; } -static waypoint* -gdb_find_wayptq(const queue* Q, const waypoint* wpt, const char exact) +static Waypoint* +gdb_find_wayptq(const queue* Q, const Waypoint* wpt, const char exact) { queue* elem, *tmp; #if NEW_STRINGS @@ -341,7 +341,7 @@ gdb_find_wayptq(const queue* Q, const waypoint* wpt, const char exact) #endif QUEUE_FOR_EACH(Q, elem, tmp) { - waypoint* tmp = (waypoint*)elem; + Waypoint* tmp = (Waypoint*)elem; #if NEW_STRINGS if (name.compare(tmp->shortname,Qt::CaseInsensitive) == 0) { #else @@ -361,10 +361,10 @@ gdb_find_wayptq(const queue* Q, const waypoint* wpt, const char exact) return NULL; } -static waypoint* -gdb_reader_find_waypt(const waypoint* wpt, const char exact) +static Waypoint* +gdb_reader_find_waypt(const Waypoint* wpt, const char exact) { - waypoint* res; + Waypoint* res; res = gdb_find_wayptq(&wayptq_in, wpt, exact); if (res == NULL) { res = gdb_find_wayptq(&wayptq_in_hidden, wpt, exact); @@ -372,10 +372,10 @@ gdb_reader_find_waypt(const waypoint* wpt, const char exact) return res; } -static waypoint* -gdb_add_route_waypt(route_head* rte, waypoint* ref, const int wpt_class) +static Waypoint* +gdb_add_route_waypt(route_head* rte, Waypoint* ref, const int wpt_class) { - waypoint* tmp, *res; + Waypoint* tmp, *res; int turn_point; tmp = gdb_reader_find_waypt(ref, 1); @@ -411,7 +411,7 @@ gdb_add_route_waypt(route_head* rte, waypoint* ref, const int wpt_class) turn_point = (gdb_roadbook && (wpt_class > gt_waypt_class_map_point) && tmp->description); #endif if (turn_point || (gdb_via == 0) || (wpt_class < gt_waypt_class_map_point)) { - res = new waypoint(*tmp); + res = new Waypoint(*tmp); route_add_wpt(rte, res); } delete ref; @@ -537,14 +537,14 @@ read_file_header(void) /*-----------------------------------------------------------------------------*/ -static waypoint* +static Waypoint* read_waypoint(gt_waypt_classes_e* waypt_class_out) { char buf[128]; /* used for temporary stuff */ int display, icon, dynamic; gt_waypt_classes_e wpt_class; int i; - waypoint* res; + Waypoint* res; garmin_fs_t* gmsd; char* str; char* bufp = buf; @@ -555,7 +555,7 @@ read_waypoint(gt_waypt_classes_e* waypt_class_out) char* sn; #endif waypt_ct++; - res = new waypoint; + res = new Waypoint; gmsd = garmin_fs_alloc(-1); fs_chain_add(&res->fs, (format_specific_data*) gmsd); @@ -837,9 +837,9 @@ read_route(void) char buf[128]; garmin_ilink_t* il_root, *il_anchor; - waypoint* wpt; + Waypoint* wpt; - wpt = new waypoint; + wpt = new Waypoint; rtept_ct++; wpt->shortname = fread_cstr(); /* shortname */ @@ -934,10 +934,10 @@ read_route(void) if (links == 0) { /* Without links we need all informations from wpt */ - waypoint* tmp = gdb_reader_find_waypt(wpt, 0); + Waypoint* tmp = gdb_reader_find_waypt(wpt, 0); if (tmp != NULL) { delete wpt; - wpt = new waypoint(*tmp); + wpt = new Waypoint(*tmp); } else { if (waypt_bounds_valid(&bounds)) { warning(MYNAME ": (has bounds)\n"); @@ -1029,7 +1029,7 @@ read_track(void) points = FREAD_i32; for (index = 0; index < points; index++) { - waypoint* wpt = new waypoint; + Waypoint* wpt = new Waypoint; trkpt_ct++; @@ -1118,7 +1118,7 @@ read_data(void) int len, delta; char typ, dump; gt_waypt_classes_e wpt_class; - waypoint* wpt; + Waypoint* wpt; route_head* trk, *rte; len = FREAD_i32; @@ -1144,9 +1144,9 @@ read_data(void) case 'W': wpt = read_waypoint(&wpt_class); if ((gdb_via == 0) || (wpt_class == 0)) { - waypoint* dupe; + Waypoint* dupe; waypt_add(wpt); - dupe = new waypoint(*wpt); + dupe = new Waypoint(*wpt); ENQUEUE_TAIL(&wayptq_in, &dupe->Q); } else { ENQUEUE_TAIL(&wayptq_in_hidden, &wpt->Q); @@ -1321,7 +1321,7 @@ write_header(void) */ static void -gdb_check_waypt(waypoint* wpt) +gdb_check_waypt(Waypoint* wpt) { double lat_orig = wpt->latitude; double lon_orig = wpt->longitude; @@ -1358,9 +1358,9 @@ gdb_check_waypt(waypoint* wpt) static void write_waypoint( #if NEW_STRINGS - const waypoint* wpt, const QString& shortname, garmin_fs_t* gmsd, + const Waypoint* wpt, const QString& shortname, garmin_fs_t* gmsd, #else - const waypoint* wpt, const char* shortname, garmin_fs_t* gmsd, + const Waypoint* wpt, const char* shortname, garmin_fs_t* gmsd, #endif const int icon, const int display) { @@ -1503,7 +1503,7 @@ route_compute_bounds(const route_head* rte, bounds* bounds) queue* elem, *tmp; waypt_init_bounds(bounds); QUEUE_FOR_EACH((queue*)&rte->waypoint_list, elem, tmp) { - waypoint* wpt = (waypoint*)elem; + Waypoint* wpt = (Waypoint*)elem; gdb_check_waypt(wpt); waypt_add_to_bounds(bounds, wpt); } @@ -1549,9 +1549,9 @@ write_route(const route_head* rte, const QString& rte_name) QUEUE_FOR_EACH((queue*)&rte->waypoint_list, elem, tmp) { - waypoint* wpt = (waypoint*)elem; - waypoint* next = (waypoint*)tmp; - waypoint* test; + Waypoint* wpt = (Waypoint*)elem; + Waypoint* next = (Waypoint*)tmp; + Waypoint* test; garmin_fs_t* gmsd = NULL; int wpt_class; @@ -1655,7 +1655,7 @@ write_track(const route_head* trk, const QString& trk_name) QUEUE_FOR_EACH((queue*)&trk->waypoint_list, elem, tmp) { double d; - waypoint* wpt = (waypoint*)elem; + Waypoint* wpt = (Waypoint*)elem; trkpt_ct++; /* increase informational number of written route points */ @@ -1721,18 +1721,18 @@ str_not_equal(const char* s1, const char* s2) #endif static void -write_waypoint_cb(const waypoint* refpt) +write_waypoint_cb(const Waypoint* refpt) { garmin_fs_t* gmsd; - waypoint* test; + Waypoint* test; gbfile* fsave; /* do this when backup always happens in main */ #if NEW_STRINGS // but, but, casting away the const here is wrong... - ((waypoint*)refpt)->shortname = refpt->shortname.trimmed(); + ((Waypoint*)refpt)->shortname = refpt->shortname.trimmed(); #else - rtrim(((waypoint*)refpt)->shortname); + rtrim(((Waypoint*)refpt)->shortname); #endif test = gdb_find_wayptq(&wayptq_out, refpt, 1); @@ -1761,7 +1761,7 @@ write_waypoint_cb(const waypoint* refpt) #else char* name; #endif - waypoint* wpt = new waypoint(*refpt); + Waypoint* wpt = new Waypoint(*refpt); gdb_check_waypt(wpt); ENQUEUE_TAIL(&wayptq_out, &wpt->Q); diff --git a/gpsbabel/geo.cc b/gpsbabel/geo.cc index d9367666b..f86548f33 100644 --- a/gpsbabel/geo.cc +++ b/gpsbabel/geo.cc @@ -49,7 +49,7 @@ geocache_container wpt_container(const QString&); void GeoReadLoc() { - waypoint* wpt = NULL; + Waypoint* wpt = NULL; QString current_tag; while (!reader.atEnd()) { @@ -58,7 +58,7 @@ void GeoReadLoc() current_tag.append("/"); current_tag.append(tag_name); if (current_tag == "/loc/waypoint") { - wpt = new waypoint; + wpt = new Waypoint; wpt->AllocGCData(); // There is no 'unknown' alt value and so many reference files have // leaked it that we just paper over that here. @@ -181,7 +181,7 @@ geo_wr_deinit(void) } static void -geo_waypt_pr(const waypoint* waypointp) +geo_waypt_pr(const Waypoint* waypointp) { writer.writeStartElement("waypoint"); diff --git a/gpsbabel/ggv_log.cc b/gpsbabel/ggv_log.cc index a81a4ed76..ab4f45d64 100644 --- a/gpsbabel/ggv_log.cc +++ b/gpsbabel/ggv_log.cc @@ -111,7 +111,7 @@ ggv_log_read(void) double xlat, xlon; float sec; struct tm tm; - waypoint* wpt; + Waypoint* wpt; if (len != bufsz) { break; @@ -124,7 +124,7 @@ ggv_log_read(void) memset(&tm, 0, sizeof(tm)); - wpt = new waypoint; + wpt = new Waypoint; deg = (int16_t) le_read16(&buf[0]); min = le_read16(&buf[2]); @@ -206,14 +206,14 @@ static void ggv_log_track_head_cb(const route_head* trk) { queue* elem, *tmp; - waypoint* prev = NULL; + Waypoint* prev = NULL; QUEUE_FOR_EACH((queue*)&trk->waypoint_list, elem, tmp) { double latmin, lonmin, latsec, lonsec; int latint, lonint; double course = 0, speed = 0; struct tm tm; - waypoint* wpt = (waypoint*)elem; + Waypoint* wpt = (Waypoint*)elem; double secs = 0; latint = wpt->latitude; diff --git a/gpsbabel/ggv_ovl.cc b/gpsbabel/ggv_ovl.cc index bf6ce7880..80318bf52 100644 --- a/gpsbabel/ggv_ovl.cc +++ b/gpsbabel/ggv_ovl.cc @@ -118,7 +118,7 @@ ggv_ovl_read(void) switch (type) { char coord[32]; - waypoint* wpt; + Waypoint* wpt; char* cx; int group; @@ -146,7 +146,7 @@ ggv_ovl_read(void) for (j = 0; j < points; j++) { - wpt = new waypoint; + wpt = new Waypoint; snprintf(coord, sizeof(coord), "YKoord%d", j); if ((cx = inifile_readstr(inifile, symbol, coord))) { @@ -174,7 +174,7 @@ ggv_ovl_read(void) case OVL_SYMBOL_CIRCLE: case OVL_SYMBOL_TRIANGLE: - wpt = new waypoint; + wpt = new Waypoint; wpt->shortname = symbol; if ((cx = inifile_readstr(inifile, symbol, "YKoord"))) { @@ -203,12 +203,12 @@ ggv_ovl_read(void) /* prototypes used in main functions */ -static void waypt_disp_cb(const waypoint* wpt); +static void waypt_disp_cb(const Waypoint* wpt); static void track_disp_cb(const route_head* trk); static void route_disp_cb(const route_head* rte); static void write_bounds(void); -static void draw_symbol_basics(const OVL_SYMBOL_TYP typ, const int art, const OVL_COLOR_TYP color, const waypoint* wpt); -static int get_direction(const waypoint* A, const waypoint* B); +static void draw_symbol_basics(const OVL_SYMBOL_TYP typ, const int art, const OVL_COLOR_TYP color, const Waypoint* wpt); +static int get_direction(const Waypoint* A, const Waypoint* B); // static void draw_symbol_text(const char *text, const waypoint *reference); /* -----------------------------------------------------------------------*/ @@ -255,7 +255,7 @@ ggv_ovl_write(void) /**************************************************************************/ static void -waypt_disp_cb(const waypoint* wpt) +waypt_disp_cb(const Waypoint* wpt) { draw_symbol_basics(OVL_SYMBOL_CIRCLE, 1, color, wpt); gbfprintf(fout, "Width=20\n"); @@ -290,7 +290,7 @@ track_disp_cb(const route_head* trk) QUEUE_FOR_EACH(&(trk->waypoint_list), elem, tmp) { - waypoint* wpt = (waypoint*) elem; + Waypoint* wpt = (Waypoint*) elem; gbfprintf(fout, "XKoord%d=%0.8f\n", i, wpt->longitude); gbfprintf(fout, "YKoord%d=%0.8f\n", i, wpt->latitude); @@ -306,7 +306,7 @@ route_disp_cb(const route_head* rte) { int i; queue* elem, *tmp; - waypoint* prev; + Waypoint* prev; int waypt_ct = rte->rte_waypt_ct; if (waypt_ct <= 0) { @@ -322,7 +322,7 @@ route_disp_cb(const route_head* rte) QUEUE_FOR_EACH(&(rte->waypoint_list), elem, tmp) { - waypoint* wpt = (waypoint*) elem; + Waypoint* wpt = (Waypoint*) elem; if (prev != NULL) { draw_symbol_basics(OVL_SYMBOL_TRIANGLE, 1, (OVL_COLOR_TYP)9 /* color */, prev); @@ -343,7 +343,7 @@ route_disp_cb(const route_head* rte) /* -----------------------------------------------------------------------*/ static void -waypt_bound_calc(const waypoint* waypointp) +waypt_bound_calc(const Waypoint* waypointp) { waypt_add_to_bounds(&all_bounds, waypointp); } @@ -371,7 +371,7 @@ write_bounds(void) } static void -draw_symbol_basics(const OVL_SYMBOL_TYP typ, const int art, const OVL_COLOR_TYP color, const waypoint* wpt) +draw_symbol_basics(const OVL_SYMBOL_TYP typ, const int art, const OVL_COLOR_TYP color, const Waypoint* wpt) { symbol_ct++; @@ -391,7 +391,7 @@ draw_symbol_basics(const OVL_SYMBOL_TYP typ, const int art, const OVL_COLOR_TYP /* the following code comes from first overlay module */ static int -get_direction(const waypoint* A, const waypoint* B) +get_direction(const Waypoint* A, const Waypoint* B) { double lata, lona, latb, lonb; double dist, dir; @@ -420,9 +420,9 @@ get_direction(const waypoint* A, const waypoint* B) #if 0 static void -draw_symbol_text(const char* text, const waypoint* reference) +draw_symbol_text(const char* text, const Waypoint* reference) { - waypoint wpt; + Waypoint wpt; if ((reference == NULL) || (text == NULL)) { return; diff --git a/gpsbabel/glogbook.cc b/gpsbabel/glogbook.cc index 2aa0d0eea..129dca827 100644 --- a/gpsbabel/glogbook.cc +++ b/gpsbabel/glogbook.cc @@ -30,7 +30,7 @@ static gbfile* ofd; static QString ostring; static QXmlStreamWriter writer(&ostring); -static waypoint* wpt_tmp; +static Waypoint* wpt_tmp; static route_head* trk_head; #define MYNAME "glogbook" @@ -97,7 +97,7 @@ glogbook_wr_deinit(void) } static void -glogbook_waypt_pr(const waypoint* wpt) +glogbook_waypt_pr(const Waypoint* wpt) { writer.writeStartElement("Trackpoint"); @@ -147,7 +147,7 @@ void gl_trk_s(xg_string args, const QXmlStreamAttributes* unused) void gl_trk_pnt_s(xg_string args, const QXmlStreamAttributes* unused) { - wpt_tmp = new waypoint; + wpt_tmp = new Waypoint; } void gl_trk_pnt_e(xg_string args, const QXmlStreamAttributes* unused) diff --git a/gpsbabel/gnav_trl.cc b/gpsbabel/gnav_trl.cc index 36d4bde70..d115a1bf4 100644 --- a/gpsbabel/gnav_trl.cc +++ b/gpsbabel/gnav_trl.cc @@ -92,13 +92,13 @@ gnav_trl_read(void) while (! gbfeof(fin)) { gnav_trl_t rec; - waypoint* wpt; + Waypoint* wpt; if (gbfread(&rec, sizeof(rec), 1, fin) != 1) { fatal(MYNAME ": Unexpected EOF (end of file)!\n"); } - wpt = new waypoint; + wpt = new Waypoint; wpt->SetCreationTime(le_read32(&rec.time)); wpt->latitude = le_read_float(&rec.lat); @@ -114,7 +114,7 @@ gnav_trl_read(void) } static void -gnav_trl_write_trkpt(const waypoint* wpt) +gnav_trl_write_trkpt(const Waypoint* wpt) { gnav_trl_t rec; diff --git a/gpsbabel/google.cc b/gpsbabel/google.cc index 9970cbd26..d3343d00a 100644 --- a/gpsbabel/google.cc +++ b/gpsbabel/google.cc @@ -120,7 +120,7 @@ void goog_segment_s(xg_string args, const QXmlStreamAttributes* attrv) void goog_segment(xg_string args, const QXmlStreamAttributes* unused) { - waypoint* wpt_tmp; + Waypoint* wpt_tmp; wpt_tmp = route_find_waypt_by_name(routehead[goog_segroute], goog_segname); if (wpt_tmp) { @@ -243,7 +243,7 @@ void goog_poly_e(xg_string args, const QXmlStreamAttributes* unused) } { - waypoint* wpt_tmp = new waypoint; + Waypoint* wpt_tmp = new Waypoint; wpt_tmp->latitude = lat / 100000.0; wpt_tmp->longitude = lon / 100000.0; wpt_tmp->route_priority=level; diff --git a/gpsbabel/googledir.cc b/gpsbabel/googledir.cc index 66e92f9f9..1ee669b6f 100644 --- a/gpsbabel/googledir.cc +++ b/gpsbabel/googledir.cc @@ -126,7 +126,7 @@ goog_poly_e(xg_string args, const QXmlStreamAttributes* unused) lon += decode_goog64(&str); { - waypoint* wpt_tmp = new waypoint; + Waypoint* wpt_tmp = new Waypoint; wpt_tmp->latitude = lat / 100000.0; wpt_tmp->longitude = lon / 100000.0; /* FIXME no need for name diff --git a/gpsbabel/gopal.cc b/gpsbabel/gopal.cc index 06293a735..4b69dd43c 100644 --- a/gpsbabel/gopal.cc +++ b/gpsbabel/gopal.cc @@ -1,7 +1,7 @@ /* - Copyright (C) 2008 Dr. Jürgen Neumann, Juergen.Neumann@online.de + Copyright (C) 2008 Dr. J�rgen Neumann, Juergen.Neumann@online.de Copyright (C) 2005 Robert Lipe, robertlipe@usa.net (based on nmea.c) Copyright (C) 20XX probably many others from the gpsbabel development team ;-) @@ -175,7 +175,7 @@ gopal_read(void) double hmsd,speed; int fix, hms; route_head* route; - waypoint* wpt, *lastwpt=NULL; + Waypoint* wpt, *lastwpt=NULL; double long_old,lat_old; char tbuffer[64]; struct tm tm2; @@ -206,7 +206,7 @@ gopal_read(void) if ((nfields == 8) && (tx == 0)) { // fatal(MYNAME ": Invalid date in filename \"%s\", try to set manually using \"date\" switch!\n", buff); } - wpt = new waypoint; + wpt = new Waypoint; column = -1; // the format of gopal is quite simple. Unfortunately the developers forgot the date as the first element... @@ -333,7 +333,7 @@ gopal_read(void) long_old=wpt->longitude; lat_old=wpt->latitude; route_add_wpt(route,wpt); - waypt_add(new waypoint(*wpt)); + waypt_add(new Waypoint(*wpt)); } } } @@ -350,7 +350,7 @@ gopal_route_tlr(const route_head* rte) } static void -gopal_write_waypt(const waypoint* wpt) +gopal_write_waypt(const Waypoint* wpt) { char tbuffer[64]; unsigned long timestamp; diff --git a/gpsbabel/gpssim.cc b/gpsbabel/gpssim.cc index 87976811c..cb50e7ed6 100644 --- a/gpsbabel/gpssim.cc +++ b/gpsbabel/gpssim.cc @@ -103,7 +103,7 @@ gpssim_write_spd(double knotsperhour) } static void -gpssim_write_pt(const waypoint* wpt) +gpssim_write_pt(const Waypoint* wpt) { char obuf[1024]; double lat, lon; diff --git a/gpsbabel/gpsutil.cc b/gpsbabel/gpsutil.cc index 264750a0c..c50245f8f 100644 --- a/gpsbabel/gpsutil.cc +++ b/gpsbabel/gpsutil.cc @@ -66,7 +66,7 @@ data_read(void) long alt; char alttype; char icon[3]; - waypoint* wpt_tmp; + Waypoint* wpt_tmp; int line = 0; /* * Make sure that all waypoints in single read have same @@ -110,7 +110,7 @@ data_read(void) rtrim(sn); rtrim(desc); rtrim(icon); - wpt_tmp = new waypoint; + wpt_tmp = new Waypoint; wpt_tmp->altitude = alt; wpt_tmp->shortname = sn; xfree(sn); @@ -136,7 +136,7 @@ data_read(void) } static void -gpsutil_disp(const waypoint* wpt) +gpsutil_disp(const Waypoint* wpt) { double lon,lat; QString icon_token; diff --git a/gpsbabel/gpx.cc b/gpsbabel/gpx.cc index 4c4bdf4d1..d9063be57 100644 --- a/gpsbabel/gpx.cc +++ b/gpsbabel/gpx.cc @@ -48,7 +48,7 @@ static QXmlStreamAttributes gpx_namespace_attribute; static QString current_tag; -static waypoint* wpt_tmp; +static Waypoint* wpt_tmp; static UrlLink* link_; static int cache_descr_is_html; static gpsbabel::File* iqfile; @@ -490,7 +490,7 @@ tag_gpx(const QXmlStreamAttributes& attr) static void tag_wpt(const QXmlStreamAttributes& attr) { - wpt_tmp = new waypoint; + wpt_tmp = new Waypoint; link_ = new UrlLink; cur_tag = NULL; @@ -608,7 +608,7 @@ static void tag_log_wpt(const QXmlStreamAttributes& attr) { /* create a new waypoint */ - waypoint* lwp_tmp = new waypoint; + Waypoint* lwp_tmp = new Waypoint; /* extract the lat/lon attributes */ if (attr.hasAttribute("lat")) { @@ -1334,7 +1334,7 @@ write_tag_attributes(xml_tag* tag) } static void -fprint_xml_chain(xml_tag* tag, const waypoint* wpt) +fprint_xml_chain(xml_tag* tag, const Waypoint* wpt) { while (tag) { writer->writeStartElement(tag->tagname); @@ -1397,7 +1397,7 @@ void free_gpx_extras(xml_tag* tag) * Handle the grossness of GPX 1.0 vs. 1.1 handling of linky links. */ static void -write_gpx_url(const waypoint* waypointp) +write_gpx_url(const Waypoint* waypointp) { if (!waypointp->HasUrlLink()) { return; @@ -1423,7 +1423,7 @@ write_gpx_url(const waypoint* waypointp) * Order counts. */ static void -gpx_write_common_acc(const waypoint* waypointp) +gpx_write_common_acc(const Waypoint* waypointp) { const char* fix = NULL; @@ -1468,7 +1468,7 @@ gpx_write_common_acc(const waypoint* waypointp) static void -gpx_write_common_position(const waypoint* waypointp) +gpx_write_common_position(const Waypoint* waypointp) { if (waypointp->altitude != unknown_alt) { writer->writeTextElement("ele", QString::number(waypointp->altitude, 'f', 6)); @@ -1478,7 +1478,7 @@ gpx_write_common_position(const waypoint* waypointp) } static void -gpx_write_common_extensions(const waypoint* waypointp, const gpx_point_type point_type) +gpx_write_common_extensions(const Waypoint* waypointp, const gpx_point_type point_type) { // gpx version we are writing is >= 1.1. if ((opt_humminbirdext && (WAYPT_HAS(waypointp, depth) || WAYPT_HAS(waypointp, temperature))) || @@ -1546,7 +1546,7 @@ gpx_write_common_extensions(const waypoint* waypointp, const gpx_point_type poin } static void -gpx_write_common_description(const waypoint* waypointp, QString oname) +gpx_write_common_description(const Waypoint* waypointp, QString oname) { writer->writeOptionalTextElement("name", oname); @@ -1566,7 +1566,7 @@ gpx_write_common_description(const waypoint* waypointp, QString oname) } static void -gpx_waypt_pr(const waypoint* waypointp) +gpx_waypt_pr(const Waypoint* waypointp) { QString oname; fs_xml* fs_gpx; @@ -1630,7 +1630,7 @@ gpx_track_hdr(const route_head* rte) } static void -gpx_track_disp(const waypoint* waypointp) +gpx_track_disp(const Waypoint* waypointp) { fs_xml* fs_gpx; int first_in_trk; @@ -1727,7 +1727,7 @@ gpx_route_hdr(const route_head* rte) } static void -gpx_route_disp(const waypoint* waypointp) +gpx_route_disp(const Waypoint* waypointp) { #if NEW_STRINGS QString oname; @@ -1771,7 +1771,7 @@ void gpx_route_pr() } static void -gpx_waypt_bound_calc(const waypoint* waypointp) +gpx_waypt_bound_calc(const Waypoint* waypointp) { waypt_add_to_bounds(&all_bounds, waypointp); } diff --git a/gpsbabel/gtm.cc b/gpsbabel/gtm.cc index 6f0f82f7c..7075432b6 100644 --- a/gpsbabel/gtm.cc +++ b/gpsbabel/gtm.cc @@ -436,11 +436,11 @@ gtm_rd_deinit(void) gbfclose(file_in); } -static void count_route_waypts(const waypoint* wpt) +static void count_route_waypts(const Waypoint* wpt) { rt_count++; } -static void count_track_waypts(const waypoint* wpt) +static void count_track_waypts(const Waypoint* wpt) { tr_count++; } @@ -512,7 +512,7 @@ gtm_read(void) route_head* first_trk_head = NULL; route_head* trk_head = NULL; route_head* rte_head = NULL; - waypoint* wpt; + Waypoint* wpt; int real_tr_count = 0; unsigned int icon; int i; @@ -526,7 +526,7 @@ gtm_read(void) /* Waypoints */ for (i = 0; i != wp_count; i++) { - wpt = new waypoint; + wpt = new Waypoint; wpt->latitude = fread_double(file_in); wpt->longitude = fread_double(file_in); convert_datum(&wpt->latitude, &wpt->longitude); @@ -561,7 +561,7 @@ gtm_read(void) /* Tracklogs */ for (i = 0; i != tr_count; i++) { - wpt = new waypoint; + wpt = new Waypoint; wpt->latitude = fread_double(file_in); wpt->longitude = fread_double(file_in); convert_datum(&wpt->latitude, &wpt->longitude); @@ -595,7 +595,7 @@ gtm_read(void) /* Routes */ for (i = 0; i != rt_count; i++) { - wpt = new waypoint; + wpt = new Waypoint; wpt->latitude = fread_double(file_in); wpt->longitude = fread_double(file_in); convert_datum(&wpt->latitude, &wpt->longitude); @@ -634,7 +634,7 @@ static int icon_from_descr(const QString& descr) return 48; } -static void write_waypt(const waypoint* wpt) +static void write_waypt(const Waypoint* wpt) { fwrite_double(file_out, wpt->latitude); fwrite_double(file_out, wpt->longitude); @@ -662,7 +662,7 @@ static void start_rte(const route_head* rte) start_new = 1; } -static void write_trk_waypt(const waypoint* wpt) +static void write_trk_waypt(const Waypoint* wpt) { fwrite_double(file_out, wpt->latitude); fwrite_double(file_out, wpt->longitude); @@ -686,7 +686,7 @@ static void write_trk_style(const route_head* trk) fwrite_integer(file_out, 0); } -static void write_rte_waypt(const waypoint* wpt) +static void write_rte_waypt(const Waypoint* wpt) { fwrite_double(file_out, wpt->latitude); fwrite_double(file_out, wpt->longitude); diff --git a/gpsbabel/gtrnctr.cc b/gpsbabel/gtrnctr.cc index ac9de4626..4f3456ddb 100644 --- a/gpsbabel/gtrnctr.cc +++ b/gpsbabel/gtrnctr.cc @@ -27,7 +27,7 @@ static gbfile* ofd; static int lap_ct = 0; static int lap_s = 0; -static waypoint* wpt_tmp; +static Waypoint* wpt_tmp; static route_head* trk_head; static computed_trkdata* tdata; @@ -255,7 +255,7 @@ gtc_new_study_lap(const route_head* rte) } static void -gtc_study_lap(const waypoint* wpt) +gtc_study_lap(const Waypoint* wpt) { if (wpt->creation_time.isValid() && (!gtc_least_time.isValid())) { gtc_least_time = wpt->GetCreationTime(); @@ -276,7 +276,7 @@ gtc_study_lap(const waypoint* wpt) } static void -gtc_waypt_pr(const waypoint* wpt) +gtc_waypt_pr(const Waypoint* wpt) { if (wpt->wpt_flags.is_split != 0) { gtc_write_xml(1, "\n"); @@ -493,7 +493,7 @@ gtc_trk_lap_e(xg_string unused, const QXmlStreamAttributes* unusedattrs) void gtc_trk_pnt_s(xg_string unused, const QXmlStreamAttributes* unusedattrs) { - wpt_tmp = new waypoint; + wpt_tmp = new Waypoint; } void @@ -504,7 +504,7 @@ gtc_trk_pnt_e(xg_string args, const QXmlStreamAttributes* unused) /* Add the first point of an ActivityLap as a waypoint as well as a trackpoint. */ char cbuf[10]; - waypoint* wpt_lap_s = new waypoint(*wpt_tmp); + Waypoint* wpt_lap_s = new Waypoint(*wpt_tmp); snprintf(cbuf, sizeof(cbuf), "LAP%03d", lap_ct); wpt_lap_s->shortname = cbuf; waypt_add(wpt_lap_s); @@ -626,7 +626,7 @@ gtc_wpt_crs_s(const QString& args, const QXmlStreamAttributes* unused) gtc_wpt_crs_s(const char* unused, const QXmlStreamAttributes* unusedattrs) #endif { - wpt_tmp = new waypoint; + wpt_tmp = new Waypoint; } void @@ -644,7 +644,7 @@ gtc_wpt_crs_e(xg_string args, const QXmlStreamAttributes* unused) void gtc_wpt_pnt_s(xg_string unused, const QXmlStreamAttributes* unusedattrs) { - wpt_tmp = new waypoint; + wpt_tmp = new Waypoint; lap_ct++; } diff --git a/gpsbabel/gui/gpsbabelfe.ts b/gpsbabel/gui/gpsbabelfe.ts index c46d8bb2c..1d69d334c 100644 --- a/gpsbabel/gui/gpsbabelfe.ts +++ b/gpsbabel/gui/gpsbabelfe.ts @@ -181,12 +181,12 @@ p, li { white-space: pre-wrap; } FileDlgManager - + Select input file - + Select output file @@ -417,8 +417,8 @@ p, li { white-space: pre-wrap; } - - + + File @@ -429,13 +429,13 @@ p, li { white-space: pre-wrap; } - + Device - + Format @@ -461,7 +461,7 @@ p, li { white-space: pre-wrap; } - + Device Name: @@ -477,301 +477,301 @@ p, li { white-space: pre-wrap; } - + Options - + Translation Options - - - + + + - - + If selected, translate waypoints. - + Waypoints - + If selected, translate routes. - + Routes - + If selected, translate tracks. - + Tracks - + Data Filters between input and output - + Filters - + More translation options. - + More Options - + Output - + If selected, output is to a file. - + If selected, output is to a device or GPS unit - + Output data format. - + Character encoding of output - + Browse for an output file name. - + File Name - + Name of port to which output device is connected - + Options for the selected output format. - + Output of GPSBabel translation process. - + Help - + GPSBabel Help - + About GPSBabel - + Quit - + Preferences... - + Check for Upgrade - + Visit Website... - + Make a Donation... - - + + default - + Select one or more input files - + Output File Name - + Error reading format configuration. Check that the backend program "gpsbabel" is properly installed and is in the current PATH This program cannot continue. - + Some file/device formats were not found during initialization. Check that the backend program "gpsbabel" is properly installed and is in the current PATH This program cannot continue. - + Input and output formats do not support %1 - + Input does not support %1; output format supports %2 - + Input format supports %1; output format does not support %2 - + Both input and output formats support %1 - + waypoints - + tracks - + routes - + There are no input options for format "%1" - - + + Options for %1 - + There are no output options for format "%1" - + No valid waypoints/routes/tracks translation specified - + No input file specified - + No valid output specified - + No output file specified - + Process "%1" did not start - + Process exited unsucessfully with code %1 - + Translation successful - + Error running gpsbabel: %1 - + Are you sure you want to reset all format options to default values? - + About %1 - + One or more data filters are active - + No data filters are active @@ -884,7 +884,8 @@ Some GPS data formats support only some subset of waypoints, tracks, and routes. OptionsDlg - + + Help @@ -1400,17 +1401,17 @@ This option computes (or recomputes) a value for the GPS heading at each trackpo - + A new version of GPSBabel is available.<br />Your version is %1 <br />The latest version is %2 - + Upgrade - + Do you wish to download an upgrade? diff --git a/gpsbabel/gui/gpsbabelfe_de.ts b/gpsbabel/gui/gpsbabelfe_de.ts index b9227b0cc..d22665723 100644 --- a/gpsbabel/gui/gpsbabelfe_de.ts +++ b/gpsbabel/gui/gpsbabelfe_de.ts @@ -194,12 +194,12 @@ p, li { white-space: pre-wrap; } FileDlgManager - + Select input file Originaldatei wählen - + Select output file Zieldatei wählen @@ -458,23 +458,23 @@ p, li { white-space: pre-wrap; } MainWindow - - + + default default - + Select one or more input files eine oder mehrere Originaldateien markieren - + Output File Name Zieldatei-Name - + Error reading format configuration. Check that the backend program "gpsbabel" is properly installed and is in the current PATH This program cannot continue. @@ -483,7 +483,7 @@ This program cannot continue. Das Programm muss abgebrochen werden. - + Some file/device formats were not found during initialization. Check that the backend program "gpsbabel" is properly installed and is in the current PATH This program cannot continue. @@ -492,114 +492,114 @@ This program cannot continue. Das Prgramm muss abgebrochen werden. - + Input and output formats do not support %1 Keine Unterstützung für %1 im Ein- oder Ausgabeformat - + Input does not support %1; output format supports %2 Keine Unterstützung für %1 im Eingabeformat; Ausgabeformat unterstützt %2 - + Input format supports %1; output format does not support %2 Eingabeformat unterstützt %1. Keine Unterstützung für %2 im Ausgabeformat - + Both input and output formats support %1 Ein- und Ausgabeformat unterstützen %1 - + waypoints Wegpunkte - + tracks tracks - + routes Routen - + There are no input options for format "%1" Es gibt keine Eingabeoptionen für das Format "%1" - - + + Options for %1 Optionen für %1 - + There are no output options for format "%1" Es gibt keine Ausgabeoptionen für das Format "%1" - + No valid waypoints/routes/tracks translation specified keine gültige Angabe von Wegpunkt-/Routen-/Trackfiltern - + No input file specified keine Quelldatei angegeben - + No valid output specified keine gültiges Ziel angegeben - + No output file specified keine Zieldatei angegeben - + Process "%1" did not start Prozess "%1" wurde nicht gestartet - + Process exited unsucessfully with code %1 Prozess endete mit code %1 - + Translation successful Konvertierung erfolgreich - + Error running gpsbabel: %1 Fehler beim Aufruf von gpsbabel: %1 - + Are you sure you want to reset all format options to default values? Sind Sie sicher, dass Sie alle Formatoptionen auf die Vorgaben stellen wollen? - + About %1 Über %1 - + One or more data filters are active Einer oder mehrere Datenfilter sind aktiviert - + No data filters are active Keine Datenfilter sind aktiv @@ -624,8 +624,8 @@ Das Prgramm muss abgebrochen werden. - - + + File Datei @@ -636,13 +636,13 @@ Das Prgramm muss abgebrochen werden. - + Device Gerät - + Format Format @@ -670,7 +670,7 @@ Das Prgramm muss abgebrochen werden. - + Device Name: Gerätename: @@ -687,169 +687,169 @@ Das Prgramm muss abgebrochen werden. - + Options Optionen - + Translation Options Übersetzungsoptionen - - - + + + - - - + If selected, translate waypoints. no sentence bei Auswahl: übersetzen von Wegpunkten - + Waypoints Wegpunkte - + If selected, translate routes. no sentence bei Auswahl: übersetzen von Routen - + Routes Routen - + If selected, translate tracks. no sentence bei Auswahl: übersetzen von Tracks - + Tracks Tracks - + Data Filters between input and output Datenfilter zwischen Ein- und Ausgabe - + Filters Filter - + More translation options. no sentence weitere Übersetzungsoptionen - + More Options weitere Optionen - + Output Ausgabe - + If selected, output is to a file. Wenn markiert, geht die Ausgabe in eine Datei. - + If selected, output is to a device or GPS unit Wenn markiert, geht die Ausgabe in eine Gerät oder eine GPS-Einheit - + Output data format. no sentence Ausgabeformat - + Character encoding of output alt.: Codepage der Ausgabe Zeichenkodierung der Ausgabe - + Browse for an output file name. no sentence Suchen nach Zieldatei-Namen - + File Name Dateiname - + Name of port to which output device is connected Name der Schnittstelle, an die das Ausgabegerät angeschlossen ist - + Options for the selected output format. no sentence Optionen für das gewählte Ausgabeformat - + Output of GPSBabel translation process. no sentence Ausgabe des GPSBabel Übersetzungsprozesses - + Help Hilfe - + GPSBabel Help GPSBabel Hilfe - + About GPSBabel Über GPSBabel - + Quit Beenden - + Preferences... Via Google Translate Einstellungen ... - + Check for Upgrade Nach Upgrade suchen - + Visit Website... Webseite besuchen ... - + Make a Donation... Spenden Sie... @@ -969,7 +969,8 @@ Manche Dateiformate unterstuetzen nur eine Teilmenge, entweder Wegpunkte oder Tr OptionsDlg - + + Help Hilfe @@ -1564,12 +1565,12 @@ Diese Option generiert für jeden Trackpunkt einen Geschwindigkeitswert. Sie wir - + A new version of GPSBabel is available.<br />Your version is %1 <br />The latest version is %2 Eine neue Version von GPSBabel ist verfügbar.<br />Die installierte Version ist %1 <br />Die neueste Version ist %2 - + Do you wish to download an upgrade? Möchten Sie die Aktualisierung herunter laden? @@ -1578,7 +1579,7 @@ Diese Option generiert für jeden Trackpunkt einen Geschwindigkeitswert. Sie wir <center><b>Eine neue GPSBabel-Version ist verf&uumlgbar</b><br>Die Version auf diesem Computer ist %1 <br>Die neueste Version ist %2</center> - + Upgrade Update diff --git a/gpsbabel/gui/gpsbabelfe_es.ts b/gpsbabel/gui/gpsbabelfe_es.ts index 4e10301a1..f934ca039 100644 --- a/gpsbabel/gui/gpsbabelfe_es.ts +++ b/gpsbabel/gui/gpsbabelfe_es.ts @@ -240,12 +240,12 @@ p, li { white-space: pre-wrap; } FileDlgManager - + Select input file Seleccionar archivo de entrada - + Select output file Seleccionar archivo de salida @@ -505,144 +505,144 @@ p, li { white-space: pre-wrap; } MainWindow - - + + default Defecto - + Select one or more input files Seleccionar uno o más archivos de entrada - + Output File Name Nombre del fichero de salida - + Error reading format configuration. Check that the backend program "gpsbabel" is properly installed and is in the current PATH This program cannot continue. Se ha producido un error cuando se intentaba leer la configuración. Compruebe que el núcleo de "gpsbabel" está instalado correctamente y que se halla en la RUTA actual. Este programa no puede continuar. - + Some file/device formats were not found during initialization. Check that the backend program "gpsbabel" is properly installed and is in the current PATH This program cannot continue. El formato de alfunos ficheros o dispositivos no se halló durante la inicialización. Compruebe que el núcleo de "gpsbabel" está instalado correctamente y que se halla en la RUTA actual. Este programa no puede continuar. - + Input and output formats do not support %1 Formatos de entrada y salida inadmisibles %1 - + Input does not support %1; output format supports %2 Formatos de entrada inadmisible %1; Formatos de salida inadmisible %2 - + Input format supports %1; output format does not support %2 - + Both input and output formats support %1 Formatos de entrada y salida admisibles (ambos) %1 - + waypoints Puntos de interés - + tracks Registro de trazados - + routes Rutas - + There are no input options for format "%1" No hay opciones de entrada para el formato "%1" - - + + Options for %1 Opciones de %1 - + There are no output options for format "%1" No hay opciones de salida para el formato "%1" - + No valid waypoints/routes/tracks translation specified Se han especificicado puntos de interés, trazados o rutas no traducibles - + No input file specified No se ha especificado el fichero de entrada - + No valid output specified El fichero de salida no es válido - + No output file specified No se ha especificado el fichero de salida - + Process "%1" did not start El proceso "%1" no comenzó - + Process exited unsucessfully with code %1 El proceso terminó sin suerte y con el código %1 - + Translation successful Traducción realizada con éxito - + Error running gpsbabel: %1 Error ejecutando gpsbabel: %1 - + Are you sure you want to reset all format options to default values? ¿Estás seguro de que quieres volver a los formatos por defecto? - + About %1 Acerca de %1 - + One or more data filters are active Uno o más filtros de datos están activos - + No data filters are active Ningún filtro de datos está activo @@ -667,8 +667,8 @@ This program cannot continue. - - + + File Archivo @@ -679,13 +679,13 @@ This program cannot continue. - + Device Dispositivo - + Format Formato @@ -712,7 +712,7 @@ This program cannot continue. - + Device Name: Nombre del dispositivo: @@ -728,159 +728,159 @@ This program cannot continue. - + Options Opciones - + Translation Options Opciones de conversión - - - + + + - - - + If selected, translate waypoints. Si se selecciona, convertir puntos de interés. - + Waypoints Puntos de interés - + If selected, translate routes. Si se selecciona, convertir las rutas. - + Routes Rutas - + If selected, translate tracks. Si se selecciona, convertir los trazados. - + Tracks Trazados - + Data Filters between input and output Filtros de datos entre la entrada y la salida - + Filters Filtros - + More translation options. Más opciones de conversión. - + More Options Más opciones - + Output Salida - + If selected, output is to a file. Si se selecciona, la salida es a un fichero. - + If selected, output is to a device or GPS unit Si se selecciona, la salida esperada es un dispositivo o un GPS - + Output data format. Formato de salida de los datos. - + Character encoding of output Codificación de los caracteres de salida - + Browse for an output file name. Selecciona el nombre del fichero de salida. - + File Name Nombre del fichero - + Name of port to which output device is connected Nombre del puerto al que está conectado el dispositivo de salida - + Options for the selected output format. Opciones aplicables al formato de salida seleccionado. - + Output of GPSBabel translation process. Salida del proceso de conversión de GPSBabel. - + Help Ayuda - + GPSBabel Help Ayuda de GPSBabel - + About GPSBabel Acerca de GPSBabel - + Quit Salir - + Preferences... Preferencias ... - + Check for Upgrade Comprueba si hay una actualización - + Visit Website... - + Make a Donation... Haga una donación... @@ -996,7 +996,8 @@ Algunos formatos de datos de los GPS solo permiten utilizar una parte de los pun OptionsDlg - + + Help Ayuda @@ -1572,12 +1573,12 @@ Esta opción calcula (o recalcula) un valor para la velocidad de cada punto del Ha devuelto datos no válidos en la línea %1: %2. - + A new version of GPSBabel is available.<br />Your version is %1 <br />The latest version is %2 Una nueva versióon de GPSBabel ha salido ya. <br />Tu versión es la %1 <br />La última versióon sería %2 - + Do you wish to download an upgrade? ¿Quieres bajarte una actualización? @@ -1586,7 +1587,7 @@ Esta opción calcula (o recalcula) un valor para la velocidad de cada punto del <center><b>Una nueva versión de GPSBabel está disponible </b><br>La versión actual es %1 <br> La versión más reciente es %2</center> - + Upgrade Actualizar diff --git a/gpsbabel/gui/gpsbabelfe_fr.ts b/gpsbabel/gui/gpsbabelfe_fr.ts index edc754461..4239e37ef 100644 --- a/gpsbabel/gui/gpsbabelfe_fr.ts +++ b/gpsbabel/gui/gpsbabelfe_fr.ts @@ -181,12 +181,12 @@ p, li { white-space: pre-wrap; } FileDlgManager - + Select input file - + Select output file @@ -444,144 +444,144 @@ p, li { white-space: pre-wrap; } MainWindow - - + + default - + Select one or more input files - + Output File Name - + Error reading format configuration. Check that the backend program "gpsbabel" is properly installed and is in the current PATH This program cannot continue. - + Some file/device formats were not found during initialization. Check that the backend program "gpsbabel" is properly installed and is in the current PATH This program cannot continue. - + Input and output formats do not support %1 - + Input does not support %1; output format supports %2 - + Input format supports %1; output format does not support %2 - + Both input and output formats support %1 - + waypoints - + tracks - + routes - + There are no input options for format "%1" - - + + Options for %1 Options pour %1 - + There are no output options for format "%1" - + No valid waypoints/routes/tracks translation specified - + No input file specified - + No valid output specified - + No output file specified - + Process "%1" did not start - + Process exited unsucessfully with code %1 - + Translation successful - + Error running gpsbabel: %1 - + Are you sure you want to reset all format options to default values? - + About %1 - + One or more data filters are active - + No data filters are active @@ -602,8 +602,8 @@ This program cannot continue. - - + + File Fichier @@ -614,13 +614,13 @@ This program cannot continue. - + Device Périphérique - + Format Format @@ -646,7 +646,7 @@ This program cannot continue. - + Device Name: via google translate nom du périphérique: @@ -664,162 +664,162 @@ This program cannot continue. - + Options Options - + Translation Options - - - + + + - - + If selected, translate waypoints. - + Waypoints Waypoints - + If selected, translate routes. - + Routes Routes - + If selected, translate tracks. - + Tracks Traces - + Data Filters between input and output - + Filters via Google Translate Filtres - + More translation options. - + More Options via Google Translate Plus d'options - + Output Sortie - + If selected, output is to a file. - + If selected, output is to a device or GPS unit - + Output data format. - + Character encoding of output - + Browse for an output file name. - + File Name - + Name of port to which output device is connected - + Options for the selected output format. - + Output of GPSBabel translation process. - + Help Aide - + GPSBabel Help Via Google Translate GPSBabel aider - + About GPSBabel - + Quit - + Preferences... - + Check for Upgrade - + Visit Website... Visitez le site web ... - + Make a Donation... Faire un don... @@ -932,7 +932,8 @@ Some GPS data formats support only some subset of waypoints, tracks, and routes. OptionsDlg - + + Help Aide @@ -1449,17 +1450,17 @@ This option computes a value for the GPS speed at each trackpoint. This is most - + A new version of GPSBabel is available.<br />Your version is %1 <br />The latest version is %2 - + Do you wish to download an upgrade? - + Upgrade diff --git a/gpsbabel/gui/gpsbabelfe_hu.ts b/gpsbabel/gui/gpsbabelfe_hu.ts index 0675a5cc0..0c1e74048 100644 --- a/gpsbabel/gui/gpsbabelfe_hu.ts +++ b/gpsbabel/gui/gpsbabelfe_hu.ts @@ -181,12 +181,12 @@ p, li { white-space: pre-wrap; } FileDlgManager - + Select input file - + Select output file @@ -444,144 +444,144 @@ p, li { white-space: pre-wrap; } MainWindow - - + + default - + Select one or more input files - + Output File Name - + Error reading format configuration. Check that the backend program "gpsbabel" is properly installed and is in the current PATH This program cannot continue. - + Some file/device formats were not found during initialization. Check that the backend program "gpsbabel" is properly installed and is in the current PATH This program cannot continue. - + Input and output formats do not support %1 - + Input does not support %1; output format supports %2 - + Input format supports %1; output format does not support %2 - + Both input and output formats support %1 - + waypoints - + tracks - + routes - + There are no input options for format "%1" - - + + Options for %1 - + There are no output options for format "%1" - + No valid waypoints/routes/tracks translation specified - + No input file specified - + No valid output specified - + No output file specified - + Process "%1" did not start - + Process exited unsucessfully with code %1 - + Translation successful - + Error running gpsbabel: %1 - + Are you sure you want to reset all format options to default values? - + About %1 - + One or more data filters are active - + No data filters are active @@ -602,8 +602,8 @@ This program cannot continue. - - + + File Fájl @@ -614,13 +614,13 @@ This program cannot continue. - + Device Készülék - + Format Formátum @@ -646,7 +646,7 @@ This program cannot continue. - + Device Name: @@ -662,159 +662,159 @@ This program cannot continue. - + Options Beállítások - + Translation Options - - - + + + - - + If selected, translate waypoints. - + Waypoints Útpontok - + If selected, translate routes. - + Routes Útvonalak - + If selected, translate tracks. - + Tracks Nyomvonalak - + Data Filters between input and output - + Filters - + More translation options. - + More Options - + Output Kimenet - + If selected, output is to a file. - + If selected, output is to a device or GPS unit - + Output data format. - + Character encoding of output - + Browse for an output file name. - + File Name - + Name of port to which output device is connected - + Options for the selected output format. - + Output of GPSBabel translation process. - + Help Segítség - + GPSBabel Help - + About GPSBabel - + Quit - + Preferences... - + Check for Upgrade - + Visit Website... - + Make a Donation... @@ -927,7 +927,8 @@ Some GPS data formats support only some subset of waypoints, tracks, and routes. OptionsDlg - + + Help Segítség @@ -1444,17 +1445,17 @@ This option computes a value for the GPS speed at each trackpoint. This is most - + A new version of GPSBabel is available.<br />Your version is %1 <br />The latest version is %2 - + Do you wish to download an upgrade? - + Upgrade diff --git a/gpsbabel/gui/gpsbabelfe_it.ts b/gpsbabel/gui/gpsbabelfe_it.ts index 7ee24834f..cf0baa7a3 100644 --- a/gpsbabel/gui/gpsbabelfe_it.ts +++ b/gpsbabel/gui/gpsbabelfe_it.ts @@ -202,12 +202,12 @@ p, li { white-space: pre-wrap; } FileDlgManager - + Select input file Seleziona il file di origine - + Select output file Seleziona il file di destinazione @@ -443,8 +443,8 @@ p, li { white-space: pre-wrap; } - - + + File File @@ -455,13 +455,13 @@ p, li { white-space: pre-wrap; } - + Device Dispositivo - + Format Formato @@ -487,7 +487,7 @@ p, li { white-space: pre-wrap; } - + Device Name: Nome del dispositivo: @@ -503,180 +503,180 @@ p, li { white-space: pre-wrap; } - + Options Opzioni - + Translation Options Opzioni di traduzione - - - + + + - - - + If selected, translate waypoints. Se selezionato, traduce i punti di interesse. - + Waypoints Punti di interesse - + If selected, translate routes. Se selezionato, traduce le rotte. - + Routes Rotte - + If selected, translate tracks. Se selezionato, traduce le tracce. - + Tracks Tracce - + Data Filters between input and output Filtri di dati tra sorgente e destinazione - + Filters Filtri - + More translation options. Altre opzioni di traduzione. - + More Options Altre opzioni - + Output Destinazione - + If selected, output is to a file. Se selezionato, la destinazione è un file. - + If selected, output is to a device or GPS unit Se selezionato, la destinazione è un dispositivo o un'unità GPS - + Output data format. Formato dei dati di destinazione. - + Character encoding of output Codifica dei caratteri della destinazione - + Browse for an output file name. Seleziona il nome del file di destinazione. - + File Name Nome del file - + Name of port to which output device is connected Nome della porta cui è connesso il dispositivo di destinazione - + Options for the selected output format. Opzioni per il formato di destinazione selezionato. - + Output of GPSBabel translation process. Risultato del processo di traduzione di GPSBabel. - + Help Aiuto - + GPSBabel Help Aiuto di GPSBabel - + About GPSBabel Informazioni su GPSBabel - + Quit Esci - + Preferences... Preferenze... - + Check for Upgrade Controlla aggiornamenti - + Visit Website... - + Make a Donation... - - + + default predefinite - + Select one or more input files Selezionare uno o più file in ingresso - + Output File Name Nome del file in uscita - + Error reading format configuration. Check that the backend program "gpsbabel" is properly installed and is in the current PATH This program cannot continue. @@ -685,7 +685,7 @@ This program cannot continue. Questo programma non può proseguire. - + Some file/device formats were not found during initialization. Check that the backend program "gpsbabel" is properly installed and is in the current PATH This program cannot continue. @@ -694,115 +694,115 @@ This program cannot continue. Questo programma non può proseguire. - + Input and output formats do not support %1 I formati di ingresso e di uscita non supportano %1 - + Input does not support %1; output format supports %2 L'ingresso non supporta %1, il formato di destinazione supporta %2 - + Input format supports %1; output format does not support %2 Il formato in ingresso supporta %1, il formato di destinazione non supporta %2 - + Both input and output formats support %1 I formati di origine e di destinazione supportano %1 - + waypoints punti di interesse - + tracks tracce - + routes rotte - + There are no input options for format "%1" Non ci sono opzioni in ingresso per il formato "%1" - - + + Options for %1 Opzioni per %1 - + There are no output options for format "%1" Non ci sono opzioni in uscita per il formato "%1" - + No valid waypoints/routes/tracks translation specified Non è stato specificato alcun punto di interesse/rotta/traccia - + No input file specified Il file di origine non è stato specificato - + No valid output specified Non è stata specificata una destinazione valida - + No output file specified Il file di destinazione non è stato specificato - + Process "%1" did not start Il processo "%1" non è stato avviato - + Process exited unsucessfully with code %1 Il processo è terminato con il codice di errorre %1 - + Translation successful Traduzione terminata con successo - + Error running gpsbabel: %1 Errore durante l'esecuzione di gpsbabel: %1 - + Are you sure you want to reset all format options to default values? Si è certi di voler reimpostare tutte le opzioni dei formati ai valori predefiniti? - + About %1 Informazioni su %1 - + One or more data filters are active È attivo uno o più filtri di dati - + No data filters are active Nessun filtro di dati è attivo @@ -917,7 +917,8 @@ Qualche formato di dati del GPS supporta solo un sottoinsieme di punti di intere OptionsDlg - + + Help Aiuto @@ -1462,17 +1463,17 @@ Questa opzione calcola (o ricalcola) un valore per la direzione del GPS in ogni Dati ricevuti non validi alla linea %1: %2. - + A new version of GPSBabel is available.<br />Your version is %1 <br />The latest version is %2 È disponibile una nuova versione di GPSBabel.<br />Versione corrente: %1 <br />Nuova versione: %2 - + Upgrade Aggiorna - + Do you wish to download an upgrade? Si desidera scaricare un aggiornamento? diff --git a/gpsbabel/gui/gpsbabelfe_ru.ts b/gpsbabel/gui/gpsbabelfe_ru.ts index 03935035c..e31ae73f9 100644 --- a/gpsbabel/gui/gpsbabelfe_ru.ts +++ b/gpsbabel/gui/gpsbabelfe_ru.ts @@ -200,12 +200,12 @@ p, li { white-space: pre-wrap; } FileDlgManager - + Select input file Выберите входной файл - + Select output file Выберите выходной файл @@ -441,8 +441,8 @@ p, li { white-space: pre-wrap; } - - + + File Файл @@ -453,13 +453,13 @@ p, li { white-space: pre-wrap; } - + Device Устройство - + Format Формат @@ -485,7 +485,7 @@ p, li { white-space: pre-wrap; } - + Device Name: Имя устройства: @@ -501,180 +501,180 @@ p, li { white-space: pre-wrap; } - + Options Параметры - + Translation Options Параметры конвертации - - - + + + - - + If selected, translate waypoints. Если выбрано, конвертируются маршрутные точки. - + Waypoints Маршрутные точки - + If selected, translate routes. Если выбрано, конвертируются маршруты. - + Routes Маршруты - + If selected, translate tracks. Если выбрано, конвертируются треки. - + Tracks Треки - + Data Filters between input and output Фильтр данных между входом и выходом - + Filters Фильтры - + More translation options. Дополнительные параметры конвертации. - + More Options Дополнительно - + Output Выход - + If selected, output is to a file. Если выбрано, результат будет направлен в файл. - + If selected, output is to a device or GPS unit Если выбрано, результат будет направлен на устройство или GPS приемник - + Output data format. Формат выходных данных. - + Character encoding of output Кодировка выходных данных - + Browse for an output file name. Выберите имя выходного файла. - + File Name Имя файла - + Name of port to which output device is connected Порт к которому подключено выходное устройство - + Options for the selected output format. Параметры выбранного выходного формата. - + Output of GPSBabel translation process. Выполняется конвертация GPSBabel. - + Help Помощь - + GPSBabel Help Справка GPSBabel - + About GPSBabel О GPSBabel - + Quit Выход - + Preferences... Настройки... - + Check for Upgrade Проверить обновления - + Visit Website... Посетите веб-сайт ... - + Make a Donation... Сделать пожертвование... - - + + default по умолчанию - + Select one or more input files Выберите один или несколько файлов - + Output File Name Имя выходного файла - + Error reading format configuration. Check that the backend program "gpsbabel" is properly installed and is in the current PATH This program cannot continue. @@ -683,7 +683,7 @@ This program cannot continue. Выполнение программы не может быть продолжено. - + Some file/device formats were not found during initialization. Check that the backend program "gpsbabel" is properly installed and is in the current PATH This program cannot continue. @@ -692,114 +692,114 @@ This program cannot continue. Выполнение программы не может быть продолжено. - + Input and output formats do not support %1 Входной и выходной форматы не поддерживают %1 - + Input does not support %1; output format supports %2 Входной формат не поддерживает %1; выходной формат поддерживает %2 - + Input format supports %1; output format does not support %2 Входной формат поддерживает %1; выходной формат не поддерживаетt %2 - + Both input and output formats support %1 Входной и выходной формат поддерживают %1 - + waypoints маршрутные точки - + tracks треки - + routes маршруты - + There are no input options for format "%1" Нет входных параметров для формата "%1" - - + + Options for %1 Параметры %1 - + There are no output options for format "%1" Нет выходных параметров для формата "%1" - + No valid waypoints/routes/tracks translation specified Не выбрано преобразование маршрутных точек/маршрутов/треков - + No input file specified Не выбран входной файл - + No valid output specified Не выбран выходной файл - + No output file specified Не выбран выходной файл - + Process "%1" did not start Процесс "%1" не запустился - + Process exited unsucessfully with code %1 Процесс завершился неудачей с кодом %1 - + Translation successful Конвертация выполнена - + Error running gpsbabel: %1 Ошибка запуска gpsbabel: %1 - + Are you sure you want to reset all format options to default values? Вы действительно желаете сбросить все параметры формата в значения по умолчанию? - + About %1 О %1 - + One or more data filters are active Один или более фильтров данных активны - + No data filters are active Фильтры данных не активны @@ -914,7 +914,8 @@ Some GPS data formats support only some subset of waypoints, tracks, and routes. OptionsDlg - + + Help Помощь @@ -1459,17 +1460,17 @@ This option computes (or recomputes) a value for the GPS heading at each trackpo Некорректные данные возвращены в строке %1: %2. - + A new version of GPSBabel is available.<br />Your version is %1 <br />The latest version is %2 Доступна новая версия GPSBabel.<br />Используемая версия %1 <br />Последняя доступная версия %2 - + Upgrade Обновить - + Do you wish to download an upgrade? Загрузить обновление? diff --git a/gpsbabel/height.cc b/gpsbabel/height.cc index a8b471402..8b48d0a75 100644 --- a/gpsbabel/height.cc +++ b/gpsbabel/height.cc @@ -104,9 +104,9 @@ static double wgs84_separation(double lat, double lon) static void -correct_height(const waypoint* wpt) +correct_height(const Waypoint* wpt) { - waypoint* waypointp = (waypoint*) wpt; + Waypoint* waypointp = (Waypoint*) wpt; if (addopt) { waypointp->altitude += addf; diff --git a/gpsbabel/hiketech.cc b/gpsbabel/hiketech.cc index f399e9eca..b4200bf12 100644 --- a/gpsbabel/hiketech.cc +++ b/gpsbabel/hiketech.cc @@ -30,7 +30,7 @@ static gbfile* ofd; static QString ostring; static gpsbabel::XmlStreamWriter writer(&ostring); -static waypoint* wpt_tmp; +static Waypoint* wpt_tmp; static route_head* trk_head; #define MYNAME "hiketech" @@ -144,7 +144,7 @@ hiketech_format_time(const QDateTime& t) } static void -hiketech_trkpt_pr(const waypoint* waypointp) +hiketech_trkpt_pr(const Waypoint* waypointp) { writer.writeStartElement("pnt"); if (waypointp->creation_time.isValid()) { @@ -160,7 +160,7 @@ hiketech_trkpt_pr(const waypoint* waypointp) } static void -hiketech_waypt_pr(const waypoint* wpt) +hiketech_waypt_pr(const Waypoint* wpt) { writer.writeStartElement("wpt"); writer.setAutoFormattingIndent(-1); @@ -194,7 +194,7 @@ hiketech_write(void) static void ht_wpt_s(xg_string args, const QXmlStreamAttributes* unused) { - wpt_tmp = new waypoint; + wpt_tmp = new Waypoint; } static @@ -256,7 +256,7 @@ void ht_trk_ident(xg_string args, const QXmlStreamAttributes* unused) static void ht_trk_pnt_s(xg_string args, const QXmlStreamAttributes* unused) { - wpt_tmp = new waypoint; + wpt_tmp = new Waypoint; } static diff --git a/gpsbabel/holux.cc b/gpsbabel/holux.cc index 4c9a0c57d..b6838251e 100644 --- a/gpsbabel/holux.cc +++ b/gpsbabel/holux.cc @@ -81,7 +81,7 @@ static void data_read(void) char name[9], desc[90]; double lat,lon; unsigned char* HxWpt; - waypoint* wpt_tmp; + Waypoint* wpt_tmp; int iCount; int iDataRead; int iWptNum; @@ -105,7 +105,7 @@ static void data_read(void) /* Get the waypoints */ for (iCount = 0; iCount < iWptNum ; iCount ++) { - wpt_tmp = new waypoint; + wpt_tmp = new Waypoint; iWptIndex = le_read16(&((WPTHDR*)HxWpt)->idx[iCount]); pWptHxTmp = (WPT*)&HxWpt[OFFS_WPT + (sizeof(WPT) * iWptIndex)]; @@ -185,7 +185,7 @@ const char* mknshort(const char* stIn,unsigned int sLen) -static void holux_disp(const waypoint* wpt) +static void holux_disp(const Waypoint* wpt) { double lon,lat; short sIndex; diff --git a/gpsbabel/html.cc b/gpsbabel/html.cc index 46b538b40..d641af15f 100644 --- a/gpsbabel/html.cc +++ b/gpsbabel/html.cc @@ -78,7 +78,7 @@ wr_deinit(void) } static void -html_disp(const waypoint* wpt) +html_disp(const Waypoint* wpt) { char* cout; int32_t utmz; @@ -248,7 +248,7 @@ html_disp(const waypoint* wpt) } static void -html_index(const waypoint* wpt) +html_index(const Waypoint* wpt) { char* sn = html_entitize(wpt->shortname); char* d = html_entitize(wpt->description); diff --git a/gpsbabel/humminbird.cc b/gpsbabel/humminbird.cc index 77a638eac..836899b05 100644 --- a/gpsbabel/humminbird.cc +++ b/gpsbabel/humminbird.cc @@ -197,7 +197,7 @@ static int waypoint_num; static short_handle wptname_sh, rtename_sh, trkname_sh; static humminbird_rte_t* humrte; static int rte_num; -static QMap map; +static QMap map; static arglist_t humminbird_args[] = { @@ -269,7 +269,7 @@ humminbird_read_wpt(gbfile* fin) humminbird_waypt_t w; double guder; int num_icons; - waypoint* wpt; + Waypoint* wpt; if (! gbfread(&w, 1, sizeof(w), fin)) { fatal(MYNAME ": Unexpected end of file!\n"); @@ -285,7 +285,7 @@ humminbird_read_wpt(gbfile* fin) /* All right! Copy the data to the gpsbabel struct... */ - wpt = new waypoint; + wpt = new Waypoint; // Could probably find a way to eliminate the alloc/copy. char *s = xstrndup(w.name, sizeof(w.name)); @@ -351,7 +351,7 @@ humminbird_read_route(gbfile* fin) route_head* rte = NULL; for (i = 0; i < hrte.count; i++) { - const waypoint* wpt; + const Waypoint* wpt; char buff[10]; hrte.points[i] = be_read16(&hrte.points[i]); @@ -368,7 +368,7 @@ humminbird_read_route(gbfile* fin) xfree(s); /* rte->rte_num = hrte.num + 1; only internal number */ } - route_add_wpt(rte, new waypoint(*wpt)); + route_add_wpt(rte, new Waypoint(*wpt)); } } } @@ -381,7 +381,7 @@ humminbird_read_track(gbfile* fin) humminbird_trk_header_t th; humminbird_trk_point_t* points; route_head* trk; - waypoint* first_wpt; + Waypoint* first_wpt; int i; int max_points = 0; int32_t accum_east; @@ -434,7 +434,7 @@ humminbird_read_track(gbfile* fin) /* We create one wpt for the info in the header */ - first_wpt = new waypoint; + first_wpt = new Waypoint; g_lat = gudermannian_i1924(accum_north); first_wpt->latitude = geocentric_to_geodetic_hwr(g_lat); first_wpt->longitude = accum_east/EAST_SCALE * 180.0; @@ -443,7 +443,7 @@ humminbird_read_track(gbfile* fin) track_add_wpt(trk, first_wpt); for (i=0 ; ilatitude = geocentric_to_geodetic_hwr(g_lat); first_wpt->longitude = accum_east/EAST_SCALE * 180.0; @@ -562,7 +562,7 @@ humminbird_read_track_old(gbfile* fin) track_add_wpt(trk, first_wpt); for (i=0 ; ishortname), wpt->latitude, wpt->longitude); if (!(tmpwpt = map[key])) { - tmpwpt = (waypoint*)wpt; - map[key] = (waypoint*) wpt; + tmpwpt = (Waypoint*)wpt; + map[key] = (Waypoint*) wpt; tmpwpt->extra_data = gb_int2ptr(waypoint_num + 1); /* NOT NULL */ humminbird_write_waypoint(wpt); } else { void* p = tmpwpt->extra_data; - tmpwpt = (waypoint*)wpt; + tmpwpt = (Waypoint*)wpt; tmpwpt->extra_data = p; } diff --git a/gpsbabel/igc.cc b/gpsbabel/igc.cc index be6762382..23109165b 100644 --- a/gpsbabel/igc.cc +++ b/gpsbabel/igc.cc @@ -156,7 +156,7 @@ static void igc_task_rec(const char* rec) char task_num[5]; char task_desc[MAXRECLEN]; - waypoint* wpt; + Waypoint* wpt; unsigned int lat_deg, lat_min, lat_frac; unsigned int lon_deg, lon_min, lon_frac; char lat_hemi[2], lon_hemi[2]; @@ -199,7 +199,7 @@ static void igc_task_rec(const char* rec) fatal(MYNAME ": task waypoint (C) record parse error\n%s", rec); } - wpt = new waypoint; + wpt = new Waypoint; wpt->latitude = ('N' == lat_hemi[0] ? 1 : -1) * (lat_deg + (lat_min * 1000 + lat_frac) / 1000.0 / 60); @@ -267,8 +267,8 @@ static void data_read(void) int pres_alt, gnss_alt; char pres_valid = 0; char gnss_valid = 0; - waypoint* pres_wpt = NULL; - waypoint* gnss_wpt = NULL; + Waypoint* pres_wpt = NULL; + Waypoint* gnss_wpt = NULL; time_t date = 0; time_t prev_tod = 0; time_t tod; @@ -350,7 +350,7 @@ static void data_read(void) &validity, &pres_alt, &gnss_alt) != 14) { fatal(MYNAME ": fix (B) record parse error\n%s\n", ibuf); } - pres_wpt = new waypoint; + pres_wpt = new Waypoint; pres_wpt->latitude = ('N' == lat_hemi[0] ? 1 : -1) * (lat_deg + (lat_min * 1000 + lat_frac) / 1000.0 / 60); @@ -377,7 +377,7 @@ static void data_read(void) // Add the same waypoint with GNSS altitude to the second // track - gnss_wpt = new waypoint(*pres_wpt); + gnss_wpt = new Waypoint(*pres_wpt); if (gnss_alt) { gnss_valid = 1; @@ -540,7 +540,7 @@ static void get_tracks(const route_head** pres_track, const route_head** gnss_tr * IGC string formatting functions */ -static char* latlon2str(const waypoint* wpt) +static char* latlon2str(const Waypoint* wpt) { static char str[18] = ""; char lat_hemi = wpt->latitude < 0 ? 'S' : 'N'; @@ -588,7 +588,7 @@ static void wr_header(void) time_t date; static const char dflt_str[] = "Unknown"; const char* str = NULL; - waypoint* wpt; + Waypoint* wpt; get_tracks(&pres_track, &track); if (!track && pres_track) { @@ -596,7 +596,7 @@ static void wr_header(void) } // Date in header record is that of the first fix record date = !track ? current_time().toTime_t() : - ((waypoint*) QUEUE_FIRST(&track->waypoint_list))->GetCreationTime().toTime_t(); + ((Waypoint*) QUEUE_FIRST(&track->waypoint_list))->GetCreationTime().toTime_t(); if (NULL == (tm = gmtime(&date))) { fatal(MYNAME ": Bad track timestamp\n"); @@ -647,7 +647,7 @@ static void wr_header(void) * Generation of IGC task declaration records */ -static void wr_task_wpt_name(const waypoint* wpt, const char* alt_name) +static void wr_task_wpt_name(const Waypoint* wpt, const char* alt_name) { gbfprintf(file_out, "C%s%s\r\n", latlon2str(wpt), #if NEW_STRINGS @@ -660,7 +660,7 @@ static void wr_task_wpt_name(const waypoint* wpt, const char* alt_name) static void wr_task_hdr(const route_head* rte) { unsigned char have_takeoff = 0; - const waypoint* wpt; + const Waypoint* wpt; char flight_date[7] = "000000"; char task_desc[MAXRECLEN] = ""; int num_tps = rte->rte_waypt_ct - 2; @@ -673,7 +673,7 @@ static void wr_task_hdr(const route_head* rte) } // See if the takeoff and landing waypoints are there or if we need to // generate them. - wpt = (waypoint*) QUEUE_LAST(&rte->waypoint_list); + wpt = (Waypoint*) QUEUE_LAST(&rte->waypoint_list); #if NEW_STRINGS if (wpt->shortname.startsWith("LANDING")) { #else @@ -681,7 +681,7 @@ static void wr_task_hdr(const route_head* rte) #endif num_tps--; } - wpt = (waypoint*) QUEUE_FIRST(&rte->waypoint_list); + wpt = (Waypoint*) QUEUE_FIRST(&rte->waypoint_list); #if NEW_STRINGS if (wpt->shortname.startsWith("TAKEOFF")) { #else @@ -721,7 +721,7 @@ static void wr_task_hdr(const route_head* rte) } } -static void wr_task_wpt(const waypoint* wpt) +static void wr_task_wpt(const Waypoint* wpt) { wr_task_wpt_name(wpt, ""); } @@ -729,7 +729,7 @@ static void wr_task_wpt(const waypoint* wpt) static void wr_task_tlr(const route_head* rte) { // If the landing waypoint is not supplied we need to generate it. - const waypoint* wpt = (waypoint*) QUEUE_LAST(&rte->waypoint_list); + const Waypoint* wpt = (Waypoint*) QUEUE_LAST(&rte->waypoint_list); QString sn = wpt->shortname; // if (!wpt->shortname || strncmp(wpt->shortname, "LANDIN", 6) != 0) { if (sn.isEmpty() || !sn.startsWith("LANDIN")) { @@ -745,7 +745,7 @@ static void wr_tasks(void) /* * Write a single fix record */ -static void wr_fix_record(const waypoint* wpt, int pres_alt, int gnss_alt) +static void wr_fix_record(const Waypoint* wpt, int pres_alt, int gnss_alt) { struct tm* tm; @@ -781,49 +781,49 @@ static int correlate_tracks(const route_head* pres_track, const route_head* gnss double speed; time_t pres_time, gnss_time; int time_diff; - const waypoint* wpt; + const Waypoint* wpt; // Deduce the landing time from the pressure altitude track based on // when we last descended to within 10m of the final track altitude. elem = QUEUE_LAST(&pres_track->waypoint_list); - last_alt = ((waypoint*) elem)->altitude; + last_alt = ((Waypoint*) elem)->altitude; do { elem = elem->prev; if (&pres_track->waypoint_list == elem) { // No track left return 0; } - alt_diff = last_alt - ((waypoint*) elem)->altitude; + alt_diff = last_alt - ((Waypoint*) elem)->altitude; if (alt_diff > 10.0) { // Last part of track was ascending return 0; } } while (alt_diff > -10.0); - pres_time = ((waypoint*) elem->next)->GetCreationTime().toTime_t(); + pres_time = ((Waypoint*) elem->next)->GetCreationTime().toTime_t(); if (global_opts.debug_level >= 1) { printf(MYNAME ": pressure landing time %s", ctime(&pres_time)); } // Deduce the landing time from the GNSS altitude track based on // when the groundspeed last dropped below a certain level. elem = QUEUE_LAST(&gnss_track->waypoint_list); - last_alt = ((waypoint*) elem)->altitude; + last_alt = ((Waypoint*) elem)->altitude; do { - wpt = (waypoint*) elem; + wpt = (Waypoint*) elem; elem = elem->prev; if (&gnss_track->waypoint_list == elem) { // No track left return 0; } // Get a crude indication of groundspeed from the change in lat/lon - time_diff = wpt->GetCreationTime().toTime_t() - ((waypoint*) elem)->GetCreationTime().toTime_t(); + time_diff = wpt->GetCreationTime().toTime_t() - ((Waypoint*) elem)->GetCreationTime().toTime_t(); speed = !time_diff ? 0 : - (fabs(wpt->latitude - ((waypoint*) elem)->latitude) + - fabs(wpt->longitude - ((waypoint*) elem)->longitude)) / time_diff; + (fabs(wpt->latitude - ((Waypoint*) elem)->latitude) + + fabs(wpt->longitude - ((Waypoint*) elem)->longitude)) / time_diff; if (global_opts.debug_level >= 2) { printf(MYNAME ": speed=%f\n", speed); } } while (speed < 0.00003); - gnss_time = ((waypoint*) elem->next)->GetCreationTime().toTime_t(); + gnss_time = ((Waypoint*) elem->next)->GetCreationTime().toTime_t(); if (global_opts.debug_level >= 1) { printf(MYNAME ": gnss landing time %s", ctime(&gnss_time)); } @@ -844,8 +844,8 @@ static double interpolate_alt(const route_head* track, time_t time) { static const queue* prev_elem = NULL; static const queue* curr_elem = NULL; - const waypoint* prev_wpt; - const waypoint* curr_wpt; + const Waypoint* prev_wpt; + const Waypoint* curr_wpt; int time_diff; double alt_diff; @@ -854,7 +854,7 @@ static double interpolate_alt(const route_head* track, time_t time) curr_elem = prev_elem = QUEUE_FIRST(&track->waypoint_list); } // Find the track points either side of the requested time - while (((waypoint*) curr_elem)->GetCreationTime().toTime_t() < time) { + while (((Waypoint*) curr_elem)->GetCreationTime().toTime_t() < time) { if (QUEUE_LAST(&track->waypoint_list) == curr_elem) { // Requested time later than all track points, we can't interpolate return unknown_alt; @@ -863,8 +863,8 @@ static double interpolate_alt(const route_head* track, time_t time) curr_elem = QUEUE_NEXT(prev_elem); } - prev_wpt = (waypoint*) prev_elem; - curr_wpt = (waypoint*) curr_elem; + prev_wpt = (Waypoint*) prev_elem; + curr_wpt = (Waypoint*) curr_elem; if (QUEUE_FIRST(&track->waypoint_list) == curr_elem) { if (curr_wpt->GetCreationTime().toTime_t() == time) { @@ -892,7 +892,7 @@ static void wr_track(void) { const route_head* pres_track; const route_head* gnss_track; - const waypoint* wpt; + const Waypoint* wpt; const queue* elem; const queue* tmp; int time_adj; @@ -917,7 +917,7 @@ static void wr_track(void) } // Iterate through waypoints in both tracks simultaneously QUEUE_FOR_EACH(&gnss_track->waypoint_list, elem, tmp) { - wpt = (waypoint*) elem; + wpt = (Waypoint*) elem; pres_alt = interpolate_alt(pres_track, wpt->GetCreationTime().toTime_t() + time_adj); wr_fix_record(wpt, (int) pres_alt, (int) wpt->altitude); } @@ -926,13 +926,13 @@ static void wr_track(void) // Only the pressure altitude track was found so generate fix // records from it alone. QUEUE_FOR_EACH(&pres_track->waypoint_list, elem, tmp) { - wr_fix_record((waypoint*) elem, (int)((waypoint*) elem)->altitude, (int) unknown_alt); + wr_fix_record((Waypoint*) elem, (int)((Waypoint*) elem)->altitude, (int) unknown_alt); } } else if (gnss_track) { // Only the GNSS altitude track was found so generate fix // records from it alone. QUEUE_FOR_EACH(&gnss_track->waypoint_list, elem, tmp) { - wr_fix_record((waypoint*) elem, (int) unknown_alt, (int)((waypoint*) elem)->altitude); + wr_fix_record((Waypoint*) elem, (int) unknown_alt, (int)((Waypoint*) elem)->altitude); } } else { // No tracks found so nothing to do diff --git a/gpsbabel/ignrando.cc b/gpsbabel/ignrando.cc index 49282db5d..0efd0f3d5 100644 --- a/gpsbabel/ignrando.cc +++ b/gpsbabel/ignrando.cc @@ -34,7 +34,7 @@ static gbfile* fout; static route_head* track; -static waypoint* wpt; +static Waypoint* wpt; static int track_index; /* index of track we'll write */ static int track_num; /* current index of track within track_disp_all */ @@ -111,7 +111,7 @@ ignr_etape_begin(xg_string args, const QXmlStreamAttributes* attrv) { ignr_xml_error((wpt != NULL)); - wpt = new waypoint; + wpt = new Waypoint; } static void @@ -211,7 +211,7 @@ ignr_write_track_trl(const route_head* track) } static void -ignr_write_waypt(const waypoint* wpt) +ignr_write_waypt(const Waypoint* wpt) { if (track_num != track_index) { return; diff --git a/gpsbabel/igo8.cc b/gpsbabel/igo8.cc index 19a7700b6..def2a2861 100644 --- a/gpsbabel/igo8.cc +++ b/gpsbabel/igo8.cc @@ -151,7 +151,7 @@ static void igo8_read_init(const char* fname) // Reader callback static void igo8_read(void) { - waypoint* wpt_tmp; + Waypoint* wpt_tmp; route_head* track_head; igo8_point point; @@ -161,7 +161,7 @@ static void igo8_read(void) while (in_point_count && gbfread(&point, sizeof(point), 1, igo8_file_in) > 0) { in_point_count--; - wpt_tmp = new waypoint; + wpt_tmp = new Waypoint; wpt_tmp->latitude = le_read32(&point.lat) / (double)0x800000; wpt_tmp->longitude = le_read32(&point.lon) / (double)0x800000; @@ -207,7 +207,7 @@ static void igo8_write_deinit(void) } // Write point callback -static void write_igo8_track_point(const waypoint* wpt) +static void write_igo8_track_point(const Waypoint* wpt) { igo8_point point; diff --git a/gpsbabel/ik3d.cc b/gpsbabel/ik3d.cc index e39e2aa2d..7dd19dbe6 100644 --- a/gpsbabel/ik3d.cc +++ b/gpsbabel/ik3d.cc @@ -34,7 +34,7 @@ static arglist_t ikt_args[] = { static QString name, text; static route_head* track; -static waypoint* waypt; +static Waypoint* waypt; static xg_callback iktobj_waypt, iktobj_type, iktobj_name, iktobj_trkpt, iktobj_text; @@ -85,7 +85,7 @@ iktobj_waypt(xg_string args, const QXmlStreamAttributes* attrv) static void iktobj_trkpt(xg_string args, const QXmlStreamAttributes* attrv) { - waypt = new waypoint; + waypt = new Waypoint; iktobj_waypt(args, attrv); track_add_wpt(track, waypt); waypt = NULL; @@ -113,7 +113,7 @@ iktobj_type(xg_string args, const QXmlStreamAttributes* unused) switch (atoi(args)) { #endif case 0: - waypt = new waypoint; + waypt = new Waypoint; break; case 1: track = route_head_alloc(); diff --git a/gpsbabel/interpolate.cc b/gpsbabel/interpolate.cc index ad800238d..975c34472 100644 --- a/gpsbabel/interpolate.cc +++ b/gpsbabel/interpolate.cc @@ -88,7 +88,7 @@ interpfilt_process(void) } first = 1; QUEUE_FOR_EACH(&rte_old->waypoint_list, elem2, tmp2) { - waypoint* wpt = (waypoint*)elem2; + Waypoint* wpt = (Waypoint*)elem2; if (first) { first = 0; } else { @@ -97,7 +97,7 @@ interpfilt_process(void) for (timen = time1+interval; timen < wpt->creation_time.toTime_t(); timen += interval) { - waypoint* wpt_new = new waypoint(*wpt); + Waypoint* wpt_new = new Waypoint(*wpt); wpt_new->SetCreationTime(timen); #if NEW_STRINGS wpt_new->shortname = QString(); @@ -134,7 +134,7 @@ interpfilt_process(void) for (distn = dist; distn < curdist; distn += dist) { - waypoint* wpt_new = new waypoint(*wpt); + Waypoint* wpt_new = new Waypoint(*wpt); wpt_new->SetCreationTime(distn/curdist* (wpt->creation_time.toTime_t() - time1) + time1); #if NEW_STRINGS @@ -164,9 +164,9 @@ interpfilt_process(void) } } if (opt_route) { - route_add_wpt(rte_new, new waypoint(*wpt)); + route_add_wpt(rte_new, new Waypoint(*wpt)); } else { - track_add_wpt(rte_new, new waypoint(*wpt)); + track_add_wpt(rte_new, new Waypoint(*wpt)); } lat1 = wpt->latitude; diff --git a/gpsbabel/itracku.cc b/gpsbabel/itracku.cc index 5d5145327..09fe4f831 100644 --- a/gpsbabel/itracku.cc +++ b/gpsbabel/itracku.cc @@ -47,14 +47,14 @@ typedef struct { } itracku_data_record; static int itracku_is_valid_data_record(itracku_data_record* d); -static void to_itracku_data_record(const waypoint* wp, itracku_data_record* d); -static waypoint* to_waypoint(itracku_data_record* d); +static void to_itracku_data_record(const Waypoint* wp, itracku_data_record* d); +static Waypoint* to_waypoint(itracku_data_record* d); /* itracku file access */ static void itracku_file_read_data_record(gbfile* fin, itracku_data_record* d); static uint32_t itracku_file_read_last_time(gbfile* fin); -static void itracku_file_read_waypts(gbfile* fin, void (*waypt_add)(waypoint* wpt)); -static void itracku_file_write_waypt(gbfile* fout, const waypoint* wpt); +static void itracku_file_read_waypts(gbfile* fin, void (*waypt_add)(Waypoint* wpt)); +static void itracku_file_write_waypt(gbfile* fout, const Waypoint* wpt); /* itracku device access */ static const unsigned char read_update_data_command[] = { 0x60, 0xb5, 0, 0, 0, 0, 0 }; /* command string to start memory dump */ @@ -74,7 +74,7 @@ static char* update_data_buffer_read; static char* update_data_buffer_write; static char* update_data_buffer_end; -static void itracku_device_dump_waypts(void* fd, void (*waypt_add)(waypoint* wpt)); +static void itracku_device_dump_waypts(void* fd, void (*waypt_add)(Waypoint* wpt)); static int itracku_device_update_data_init(); static int itracku_device_update_data_read(void* buf, int len); static void itracku_device_write_string(const char* s); @@ -288,11 +288,11 @@ encode_itracku_time(time_t time) /* Converts a itracku waypoint record to a gpsbabel waypoint. */ -static waypoint* +static Waypoint* to_waypoint(itracku_data_record* d) { - waypoint* wp; - wp = new waypoint; + Waypoint* wp; + wp = new Waypoint; wp->longitude = deg_min_to_deg(le_read32(d->longitude)); wp->latitude = deg_min_to_deg(le_read32(d->latitude)); wp->SetCreationTime(decode_itracku_time(le_read32(d->creation_time))); @@ -303,7 +303,7 @@ to_waypoint(itracku_data_record* d) } static void -to_itracku_data_record(const waypoint* wp, itracku_data_record* d) +to_itracku_data_record(const Waypoint* wp, itracku_data_record* d) { le_write32(d->longitude, deg_to_deg_min(wp->longitude)); le_write32(d->latitude, deg_to_deg_min(wp->latitude)); @@ -509,7 +509,7 @@ itracku_is_valid_data_record(itracku_data_record* d) } static void -itracku_device_dump_waypts(void* fd, void (*waypt_add)(waypoint* wpt)) +itracku_device_dump_waypts(void* fd, void (*waypt_add)(Waypoint* wpt)) { itracku_data_record d; @@ -549,7 +549,7 @@ itracku_file_read_last_time(gbfile* fin) } static void -itracku_file_read_waypts(gbfile* fin, void (*waypt_add)(waypoint* wpt)) +itracku_file_read_waypts(gbfile* fin, void (*waypt_add)(Waypoint* wpt)) { itracku_data_record d; @@ -564,7 +564,7 @@ itracku_file_read_waypts(gbfile* fin, void (*waypt_add)(waypoint* wpt)) } static void -itracku_file_write_waypt(gbfile* fout, const waypoint* wpt) +itracku_file_write_waypt(gbfile* fout, const Waypoint* wpt) { itracku_data_record d; to_itracku_data_record(wpt, &d); @@ -572,7 +572,7 @@ itracku_file_write_waypt(gbfile* fout, const waypoint* wpt) } static void -itracku_waypt_input(void (*waypt_add)(waypoint* wpt)) +itracku_waypt_input(void (*waypt_add)(Waypoint* wpt)) { if (fd) { itracku_device_dump_waypts(fd, waypt_add); @@ -590,7 +590,7 @@ itracku_read_waypt(void) static route_head* itracku_read_trk_track; static void -itracku_read_trk_waypt_add(waypoint* wpt) +itracku_read_trk_waypt_add(Waypoint* wpt) { track_add_wpt(itracku_read_trk_track, wpt); } @@ -635,7 +635,7 @@ itracku_wr_deinit(void) } static void -itracku_output_waypoint(const waypoint* wp) +itracku_output_waypoint(const Waypoint* wp) { itracku_file_write_waypt(fout, wp); } @@ -659,7 +659,7 @@ itracku_rt_init(const char* fname) } static void -nmea_set_waypoint_time(waypoint* wpt, struct tm* time, double fsec) +nmea_set_waypoint_time(Waypoint* wpt, struct tm* time, double fsec) { if (time->tm_year == 0) { wpt->SetCreationTime(((((time_t)time->tm_hour * 60) + time->tm_min) * 60) + time->tm_sec, lround(1000.0 * fsec)); @@ -674,7 +674,7 @@ nmea_set_waypoint_time(waypoint* wpt, struct tm* time, double fsec) } } -static waypoint* +static Waypoint* gprmc_parse(char* ibuf) { double latdeg, lngdeg; @@ -683,7 +683,7 @@ gprmc_parse(char* ibuf) char fix; unsigned int dmy; double speed,course; - waypoint* waypt; + Waypoint* waypt; double fsec; struct tm tm; @@ -710,7 +710,7 @@ gprmc_parse(char* ibuf) dmy = dmy / 100; tm.tm_mday = dmy; - waypt = new waypoint; + waypt = new Waypoint; WAYPT_SET(waypt, speed, KNOTS_TO_MPS(speed)); @@ -738,11 +738,11 @@ gprmc_parse(char* ibuf) andreas.grimme@gmx.net */ -static waypoint* +static Waypoint* itracku_rt_position(posn_status* posn_status) { char line[1024]; - waypoint* wpt; + Waypoint* wpt; while (1) { gbser_read_line(fd, line, sizeof(line), 5000, 13, 10); dbg(1, line); diff --git a/gpsbabel/jogmap.cc b/gpsbabel/jogmap.cc index b8a703782..c90db8bfb 100644 --- a/gpsbabel/jogmap.cc +++ b/gpsbabel/jogmap.cc @@ -52,7 +52,7 @@ jogmap_markers(xg_string args, const QXmlStreamAttributes* attrv) static void jogmap_marker(xg_string args, const QXmlStreamAttributes* attrv) { - waypoint* wpt = new waypoint; + Waypoint* wpt = new Waypoint; if (attrv->hasAttribute("lat")) { wpt->latitude = attrv->value("lat").toString().toDouble(); diff --git a/gpsbabel/jtr.cc b/gpsbabel/jtr.cc index 255b64e8e..c58a3225e 100644 --- a/gpsbabel/jtr.cc +++ b/gpsbabel/jtr.cc @@ -37,7 +37,7 @@ arglist_t jtr_args[] = { }; static gbfile* fin, *fout; -static QHash trkpts; +static QHash trkpts; static time_t jtr_parse_time(const char* str, struct tm* tm, int* milli) @@ -105,7 +105,7 @@ jtr_read(void) route_head* trk = NULL; while ((str = gbfgetstr(fin))) { - waypoint* wpt; + Waypoint* wpt; struct tm tm; char* tmp; int column = -1; @@ -213,7 +213,7 @@ jtr_read(void) continue; } - wpt = new waypoint; + wpt = new Waypoint; wpt->latitude = lat; wpt->longitude = lon; @@ -265,7 +265,7 @@ jtr_wr_deinit(void) } static void -jtr_trkpt_disp_cb(const waypoint* wpt) +jtr_trkpt_disp_cb(const Waypoint* wpt) { char* str, *tmp; char stime[10], sdate[7], scourse[6], sspeed[8]; diff --git a/gpsbabel/kml.cc b/gpsbabel/kml.cc index 74a5ce11e..bcbfdfde3 100644 --- a/gpsbabel/kml.cc +++ b/gpsbabel/kml.cc @@ -63,7 +63,7 @@ static int rotate_colors; static int line_width; static int html_encrypt; -static waypoint* wpt_tmp; +static Waypoint* wpt_tmp; static int wpt_tmp_queued; static const char* posnfilename; static char* posnfilenametmp; @@ -272,7 +272,7 @@ const char* kml_tags_to_ignore[] = { void wpt_s(xg_string args, const QXmlStreamAttributes* unused) { - wpt_tmp = new waypoint; + wpt_tmp = new Waypoint; wpt_tmp_queued = 0; } @@ -327,7 +327,7 @@ void trk_coord(xg_string args, const QXmlStreamAttributes* attrv) { int consumed = 0; double lat, lon, alt; - waypoint* trkpt; + Waypoint* trkpt; int n = 0; route_head* trk_head = route_head_alloc(); @@ -338,7 +338,7 @@ void trk_coord(xg_string args, const QXmlStreamAttributes* attrv) } track_add_head(trk_head); while ((n = sscanf(CSTR(iargs), "%lf,%lf,%lf%n", &lon, &lat, &alt, &consumed)) > 0) { - trkpt = new waypoint; + trkpt = new Waypoint; trkpt->latitude = lat; trkpt->longitude = lon; @@ -567,7 +567,7 @@ static void kml_write_bitmap_style(kml_point_type pt_type, const char* bitmap, writer->writeEndElement(); // Close StyleMap tag } -static void kml_output_timestamp(const waypoint* waypointp) +static void kml_output_timestamp(const Waypoint* waypointp) { QString time_string = waypointp->CreationTimeXML(); if (!time_string.isEmpty()) { @@ -726,7 +726,7 @@ void kml_output_header(const route_head* header, computed_trkdata* td) } static -int kml_altitude_known(const waypoint* waypoint) +int kml_altitude_known(const Waypoint* waypoint) { if (waypoint->altitude == unknown_alt) { return 0; @@ -740,7 +740,7 @@ int kml_altitude_known(const waypoint* waypoint) } static -void kml_write_coordinates(const waypoint* waypointp) +void kml_write_coordinates(const Waypoint* waypointp) { if (kml_altitude_known(waypointp)) { writer->writeTextElement("coordinates", @@ -759,7 +759,7 @@ void kml_write_coordinates(const waypoint* waypointp) /* Rather than a default "top down" view, view from the side to highlight * topo features. */ -static void kml_output_lookat(const waypoint* waypointp) +static void kml_output_lookat(const Waypoint* waypointp) { writer->writeStartElement("LookAt"); writer->writeTextElement("longitude", QString::number(waypointp->longitude, 'f', 6)); @@ -780,7 +780,7 @@ static void kml_output_positioning(void) } /* Output something interesing when we can for route and trackpoints */ -static void kml_output_description(const waypoint* pt) +static void kml_output_description(const Waypoint* pt) { const char* alt_units; double alt; @@ -851,7 +851,7 @@ static void kml_output_description(const waypoint* pt) writer->writeEndElement(); // Close description tag } -static void kml_recompute_time_bounds(const waypoint* waypointp) +static void kml_recompute_time_bounds(const Waypoint* waypointp) { if (waypointp->GetCreationTime().isValid()) { if (!(kml_time_min.isValid()) || @@ -865,13 +865,13 @@ static void kml_recompute_time_bounds(const waypoint* waypointp) } } -static void kml_add_to_bounds(const waypoint* waypointp) +static void kml_add_to_bounds(const Waypoint* waypointp) { waypt_add_to_bounds(&kml_bounds, waypointp); kml_recompute_time_bounds(waypointp); } -static void kml_output_point(const waypoint* waypointp, kml_point_type pt_type) +static void kml_output_point(const Waypoint* waypointp, kml_point_type pt_type) { const char* style; @@ -946,7 +946,7 @@ static void kml_output_tailer(const route_head* header) queue* elem, *tmp; QUEUE_FOR_EACH(&header->waypoint_list, elem, tmp) { - waypoint* tpt = (waypoint*) elem; + Waypoint* tpt = (Waypoint*) elem; int first_in_trk = tpt->Q.prev == &header->waypoint_list; if (!first_in_trk && tpt->wpt_flags.new_trkseg) { needs_multigeometry = 1; @@ -983,7 +983,7 @@ static void kml_output_tailer(const route_head* header) } QUEUE_FOR_EACH(&header->waypoint_list, elem, tmp) { - waypoint* tpt = (waypoint*) elem; + Waypoint* tpt = (Waypoint*) elem; int first_in_trk = tpt->Q.prev == &header->waypoint_list; if (tpt->wpt_flags.new_trkseg) { if (!first_in_trk) { @@ -1177,7 +1177,7 @@ void kml_gc_make_balloonstyle(void) static char* -kml_lookup_gc_icon(const waypoint* waypointp) +kml_lookup_gc_icon(const Waypoint* waypointp) { const char* icon; char* rb; @@ -1236,7 +1236,7 @@ kml_lookup_gc_icon(const waypoint* waypointp) static const char* -kml_lookup_gc_container(const waypoint* waypointp) +kml_lookup_gc_container(const Waypoint* waypointp) { const char* cont; @@ -1287,7 +1287,7 @@ char* kml_gc_mkstar(int rating) return tmp; } -QString kml_geocache_get_logs(const waypoint* wpt) +QString kml_geocache_get_logs(const Waypoint* wpt) { QString r; @@ -1392,7 +1392,7 @@ static void kml_write_cdata_element(const QString& name, const QString& value) writer->writeEndElement(); // Close Data tag } -static void kml_geocache_pr(const waypoint* waypointp) +static void kml_geocache_pr(const Waypoint* waypointp) { char* is; char date_placed[100]; // Always long engough for a date. @@ -1486,7 +1486,7 @@ static void kml_geocache_pr(const waypoint* waypointp) * WAYPOINTS */ -static void kml_waypt_pr(const waypoint* waypointp) +static void kml_waypt_pr(const Waypoint* waypointp) { QString icon; @@ -1568,7 +1568,7 @@ static void kml_track_hdr(const route_head* header) xfree(td); } -static void kml_track_disp(const waypoint* waypointp) +static void kml_track_disp(const Waypoint* waypointp) { kml_output_point(waypointp, kmlpt_track); } @@ -1606,7 +1606,7 @@ static void kml_mt_simple_array(const route_head* header, QUEUE_FOR_EACH(&header->waypoint_list, elem, tmp) { - waypoint* wpt = (waypoint*) elem; + Waypoint* wpt = (Waypoint*) elem; switch (member) { case fld_power: @@ -1637,7 +1637,7 @@ static int track_has_time(const route_head* header) queue* elem, *tmp; int points_with_time = 0; QUEUE_FOR_EACH(&header->waypoint_list, elem, tmp) { - waypoint* tpt = (waypoint*)elem; + Waypoint* tpt = (Waypoint*)elem; if (tpt->GetCreationTime().isValid()) { points_with_time++; @@ -1655,7 +1655,7 @@ static void write_as_linestring(const route_head* header) queue* elem, *tmp; kml_track_hdr(header); QUEUE_FOR_EACH(&header->waypoint_list, elem, tmp) { - waypoint* tpt = (waypoint*)elem; + Waypoint* tpt = (Waypoint*)elem; kml_track_disp(tpt); } kml_track_tlr(header); @@ -1685,7 +1685,7 @@ static void kml_mt_hdr(const route_head* header) kml_output_positioning(); QUEUE_FOR_EACH(&header->waypoint_list, elem, tmp) { - waypoint* tpt = (waypoint*)elem; + Waypoint* tpt = (Waypoint*)elem; if (tpt->GetCreationTime().isValid()) { QString time_string = tpt->CreationTimeXML(); @@ -1698,7 +1698,7 @@ static void kml_mt_hdr(const route_head* header) // TODO: How to handle clamped, floating, extruded, etc.? QUEUE_FOR_EACH(&header->waypoint_list, elem, tmp) { - waypoint* tpt = (waypoint*)elem; + Waypoint* tpt = (Waypoint*)elem; if (kml_altitude_known(tpt)) { writer->writeTextElement("gx:coord", @@ -1780,7 +1780,7 @@ static void kml_route_hdr(const route_head* header) kml_output_header(header, NULL); } -static void kml_route_disp(const waypoint* waypointp) +static void kml_route_disp(const Waypoint* waypointp) { kml_output_point(waypointp, kmlpt_route); } @@ -2043,7 +2043,7 @@ kml_get_posn_icon(int freshness) static route_head* posn_trk_head = NULL; static void -kml_wr_position(waypoint* wpt) +kml_wr_position(Waypoint* wpt) { static gpsbabel::DateTime last_valid_fix; @@ -2084,11 +2084,11 @@ kml_wr_position(waypoint* wpt) track points if we've not moved a minimum distance from the beginnning of our accumulated track. */ { - waypoint* newest_posn= (waypoint*) QUEUE_LAST(&posn_trk_head->waypoint_list); + Waypoint* newest_posn= (Waypoint*) QUEUE_LAST(&posn_trk_head->waypoint_list); if (radtometers(gcdist(RAD(wpt->latitude), RAD(wpt->longitude), RAD(newest_posn->latitude), RAD(newest_posn->longitude))) > 50) { - track_add_wpt(posn_trk_head, new waypoint(*wpt)); + track_add_wpt(posn_trk_head, new Waypoint(*wpt)); } else { /* If we haven't move more than our threshold, pretend * we didn't move at all to prevent Earth from jittering @@ -2109,7 +2109,7 @@ kml_wr_position(waypoint* wpt) */ while (max_position_points && (posn_trk_head->rte_waypt_ct >= max_position_points)) { - waypoint* tonuke = (waypoint*) QUEUE_FIRST(&posn_trk_head->waypoint_list); + Waypoint* tonuke = (Waypoint*) QUEUE_FIRST(&posn_trk_head->waypoint_list); track_del_wpt(posn_trk_head, tonuke); } diff --git a/gpsbabel/lmx.cc b/gpsbabel/lmx.cc index 7c4dc30ad..28de275bc 100644 --- a/gpsbabel/lmx.cc +++ b/gpsbabel/lmx.cc @@ -32,7 +32,7 @@ #include "xmlgeneric.h" static gbfile* ofd; -static waypoint* wpt_tmp; +static Waypoint* wpt_tmp; QString urllink; QString urllinkt; static char* binary = NULL; @@ -194,7 +194,7 @@ lmx_write_xml(int tag, const QString& data, int indent) } static void -lmx_print(const waypoint* wpt) +lmx_print(const Waypoint* wpt) { QString oname; QString odesc; @@ -338,7 +338,7 @@ lmx_rd_deinit(void) static void lmx_lm_start(xg_string args, const QXmlStreamAttributes* unused) { - wpt_tmp = new waypoint; + wpt_tmp = new Waypoint; } static void diff --git a/gpsbabel/lowranceusr.cc b/gpsbabel/lowranceusr.cc index fc1728458..16391c185 100644 --- a/gpsbabel/lowranceusr.cc +++ b/gpsbabel/lowranceusr.cc @@ -378,7 +378,7 @@ lat_deg_to_mm(double x) } static void -lowranceusr_parse_waypt(waypoint* wpt_tmp) +lowranceusr_parse_waypt(Waypoint* wpt_tmp) { char buff[MAXUSRSTRINGSIZE + 1]; int text_len; @@ -453,7 +453,7 @@ lowranceusr_parse_routes(void) short int num_routes, num_legs; int i,j; int text_len; - waypoint* wpt_tmp; + Waypoint* wpt_tmp; num_routes = gbfgetint16(file_in); @@ -481,7 +481,7 @@ lowranceusr_parse_routes(void) /* waypoints */ for (j=0; j < num_legs; j++) { - wpt_tmp = new waypoint; + wpt_tmp = new Waypoint; lowranceusr_parse_waypt(wpt_tmp); route_add_wpt(rte_head, wpt_tmp); } @@ -512,8 +512,8 @@ lowranceusr_parse_icons(void) /* symbol */ (void) gbfread(&buff[0], 4, 1, file_in); } else { - waypoint* wpt_tmp; - wpt_tmp = new waypoint; + Waypoint* wpt_tmp; + wpt_tmp = new Waypoint; /* position coord lat & long */ wpt_tmp->latitude = lat_mm_to_deg(gbfgetint32(file_in)); @@ -536,7 +536,7 @@ lowranceusr_parse_trails(void) short int num_trails, num_trail_points, num_section_points; int i,j, trk_num, itmp; int text_len; - waypoint* wpt_tmp; + Waypoint* wpt_tmp; route_head* trk_tmp; /* num trails */ @@ -594,7 +594,7 @@ lowranceusr_parse_trails(void) } for (j=0; j < num_section_points; j++, num_trail_points--) { - wpt_tmp = new waypoint; + wpt_tmp = new Waypoint; wpt_tmp->latitude = lat_mm_to_deg(gbfgetint32(file_in)); wpt_tmp->longitude = lon_mm_to_deg(gbfgetint32(file_in)); /* continuous */ @@ -653,9 +653,9 @@ data_read(void) } for (i = 0; i < NumWaypoints; i++) { - waypoint* wpt_tmp; + Waypoint* wpt_tmp; - wpt_tmp = new waypoint; + wpt_tmp = new Waypoint; /* Object num */ object_num = gbfgetint16(file_in); @@ -675,7 +675,7 @@ data_read(void) } static void -lowranceusr_waypt_disp(const waypoint* wpt) +lowranceusr_waypt_disp(const Waypoint* wpt) { int text_len, Lat, Lon, Time, SymbolId; short int WayptType; @@ -805,7 +805,7 @@ lowranceusr_waypt_disp(const waypoint* wpt) } static void -lowranceusr_waypt_pr(const waypoint* wpt) +lowranceusr_waypt_pr(const Waypoint* wpt) { /* our personal waypoint counter */ @@ -829,7 +829,7 @@ lowranceusr_waypt_pr(const waypoint* wpt) * 4 bytes symbol */ static void -lowranceusr_write_icon(const waypoint* wpt) +lowranceusr_write_icon(const Waypoint* wpt) { int latmm = lat_deg_to_mm(wpt->latitude); int lonmm = lon_deg_to_mm(wpt->longitude); @@ -964,7 +964,7 @@ lowranceusr_route_hdr(const route_head* rte) } static void -lowranceusr_track_disp(const waypoint* wpt) +lowranceusr_track_disp(const Waypoint* wpt) { int lat, lon; diff --git a/gpsbabel/lowranceusr4.cc b/gpsbabel/lowranceusr4.cc index ff82f5fa1..e7a492c93 100644 --- a/gpsbabel/lowranceusr4.cc +++ b/gpsbabel/lowranceusr4.cc @@ -46,7 +46,7 @@ static int waypt_uid; static int route_uid; static int track_uid; -static waypoint** waypt_table; +static Waypoint** waypt_table; static int waypt_table_sz, waypt_table_ct; static char* opt_title; @@ -282,7 +282,7 @@ lowranceusr4_alloc_fsdata(void) /* make waypoint shortnames unique */ static char -same_points(const waypoint* A, const waypoint* B) +same_points(const Waypoint* A, const Waypoint* B) { return ( /* !!! We are case-sensitive !!! */ #if NEW_STRINGS @@ -295,13 +295,13 @@ same_points(const waypoint* A, const waypoint* B) } static void -register_waypt(const waypoint* ref) +register_waypt(const Waypoint* ref) { int i; - waypoint* wpt = (waypoint*) ref; + Waypoint* wpt = (Waypoint*) ref; for (i = 0; i < waypt_table_ct; i++) { - waypoint* cmp = waypt_table[i]; + Waypoint* cmp = waypt_table[i]; if (same_points(wpt, cmp)) { return; @@ -311,9 +311,9 @@ register_waypt(const waypoint* ref) if (waypt_table_ct >= waypt_table_sz) { waypt_table_sz += 32; if (waypt_table) { - waypt_table = (waypoint**) xrealloc(waypt_table, waypt_table_sz * sizeof(wpt)); + waypt_table = (Waypoint**) xrealloc(waypt_table, waypt_table_sz * sizeof(wpt)); } else { - waypt_table = (waypoint**) xmalloc(waypt_table_sz * sizeof(wpt)); + waypt_table = (Waypoint**) xmalloc(waypt_table_sz * sizeof(wpt)); } } @@ -322,18 +322,18 @@ register_waypt(const waypoint* ref) CSTRc(wpt->shortname), CSTRc(wpt->description), waypt_table_ct); } - waypt_table[waypt_table_ct] = (waypoint*)wpt; + waypt_table[waypt_table_ct] = (Waypoint*)wpt; waypt_table_ct++; } /* end borrowed from raymarine.c */ static int -lowranceusr4_find_waypt_index(const waypoint* wpt) +lowranceusr4_find_waypt_index(const Waypoint* wpt) { int i; for (i = 0; i < waypt_table_ct; ++i) { - if (same_points(wpt, (const waypoint*)waypt_table[i])) { + if (same_points(wpt, (const Waypoint*)waypt_table[i])) { return i; } } @@ -357,9 +357,9 @@ lowranceusr4_parse_waypoints(void) } for (i = 0; i < num_waypts; ++i) { - waypoint* wpt_tmp; + Waypoint* wpt_tmp; - wpt_tmp = new waypoint; + wpt_tmp = new Waypoint; lowranceusr4_fsdata* fsdata = lowranceusr4_alloc_fsdata(); fs_chain_add(&(wpt_tmp->fs), (format_specific_data*) fsdata); @@ -470,15 +470,15 @@ lowranceusr4_parse_waypoints(void) } } -static waypoint* +static Waypoint* lowranceusr4_find_waypt(int uid_unit, int uid_seq_low, int uid_seq_high) { queue* elem, *tmp; - waypoint* waypointp; + Waypoint* waypointp; lowranceusr4_fsdata* fs = NULL; QUEUE_FOR_EACH(&waypt_head, elem, tmp) { - waypointp = (waypoint*) elem; + waypointp = (Waypoint*) elem; fs = (lowranceusr4_fsdata*) fs_chain_find(waypointp->fs, FS_LOWRANCEUSR4); if (fs && fs->uid_unit == uid_unit && @@ -501,7 +501,7 @@ lowranceusr4_parse_routes(void) unsigned int num_routes, i, j, text_len; unsigned int num_legs; char buff[MAXUSRSTRINGSIZE + 1]; - waypoint* wpt_tmp; + Waypoint* wpt_tmp; unsigned int uid_unit, uid_seq_low, uid_seq_high; num_routes = gbfgetint32(file_in); @@ -564,7 +564,7 @@ lowranceusr4_parse_routes(void) printf(MYNAME " parse_routes: added wpt %s to route %s\n", CSTRc(wpt_tmp->shortname), CSTRc(rte_head->rte_name)); } - route_add_wpt(rte_head, new waypoint(*wpt_tmp)); + route_add_wpt(rte_head, new Waypoint(*wpt_tmp)); } } @@ -578,7 +578,7 @@ lowranceusr4_parse_trails(void) { int num_trails, num_trail_pts, M, i, j, k, trk_num, text_len; char buff[MAXUSRSTRINGSIZE + 1]; - waypoint* wpt_tmp; + Waypoint* wpt_tmp; /* num trails */ num_trails = gbfgetint32(file_in); @@ -683,7 +683,7 @@ lowranceusr4_parse_trails(void) } for (j = 0; j < num_trail_pts; ++j) { - wpt_tmp = new waypoint; + wpt_tmp = new Waypoint; /* Some unknown bytes */ gbfgetint16(file_in); @@ -773,7 +773,7 @@ data_read(void) static void -lowranceusr4_waypt_disp(const waypoint* wpt) +lowranceusr4_waypt_disp(const Waypoint* wpt) { /* UID unit number */ gbfputint32(opt_serialnum_i, file_out); @@ -850,7 +850,7 @@ lowranceusr4_write_waypoints(void) printf(MYNAME " writing out waypt %d (%s - %s)\n", i, CSTRc(waypt_table[i]->shortname), CSTRc(waypt_table[i]->description)); } - lowranceusr4_waypt_disp((const waypoint*)waypt_table[i]); + lowranceusr4_waypt_disp((const Waypoint*)waypt_table[i]); } } @@ -880,7 +880,7 @@ lowranceusr4_write_route_hdr(const route_head* rte) } static void -lowranceusr4_write_wpt_uids(const waypoint* wpt) +lowranceusr4_write_wpt_uids(const Waypoint* wpt) { int waypt_idx; @@ -976,7 +976,7 @@ lowranceusr4_write_track_hdr(const route_head* trk) } static void -lowranceusr4_write_track_waypt(const waypoint* wpt) +lowranceusr4_write_track_waypt(const Waypoint* wpt) { /* Some unknown bytes */ gbfputint16(0, file_out); diff --git a/gpsbabel/magellan.h b/gpsbabel/magellan.h index cfa740660..69fa0e953 100644 --- a/gpsbabel/magellan.h +++ b/gpsbabel/magellan.h @@ -50,5 +50,5 @@ QString mag_find_token_from_descr(const QString& icon); unsigned int mag_checksum(const char* const buf); QString m330_cleanse(const char* istring); -waypoint* mag_trkparse(char* trkmsg); +Waypoint* mag_trkparse(char* trkmsg); void mag_rteparse(char* rtemsg); diff --git a/gpsbabel/maggeo.cc b/gpsbabel/maggeo.cc index 9064fa7a2..f31340463 100644 --- a/gpsbabel/maggeo.cc +++ b/gpsbabel/maggeo.cc @@ -85,7 +85,7 @@ maggeo_read(void) char* buff; while ((buff = gbfgetstr(maggeofile_in))) { - waypoint* wpt_tmp; + Waypoint* wpt_tmp; geocache_data* gcdata; char* s = NULL; int fld; @@ -101,7 +101,7 @@ maggeo_read(void) buff += 9; /* skip field no. 1 */ fld = 1; - wpt_tmp = new waypoint; + wpt_tmp = new Waypoint; gcdata = wpt_tmp->AllocGCData(); while ((s = csv_lineparse(buff, ",", "", fld++))) { @@ -236,7 +236,7 @@ append(char* buf, const char* str) } static void -maggeo_waypt_pr(const waypoint* waypointp) +maggeo_waypt_pr(const Waypoint* waypointp) { char obuf[4096]; double ilon, ilat; diff --git a/gpsbabel/magproto.cc b/gpsbabel/magproto.cc index 3fc9b76cd..7c53a3591 100644 --- a/gpsbabel/magproto.cc +++ b/gpsbabel/magproto.cc @@ -111,7 +111,7 @@ static int is_file = 0; static route_head* trk_head; static int ignore_unable; -static waypoint* mag_wptparse(char*); +static Waypoint* mag_wptparse(char*); typedef QString (cleanse_fn)(const char*); static cleanse_fn* mag_cleanse; static const char** os_get_magellan_mountpoints(); @@ -487,7 +487,7 @@ retry: return; } if (strncmp(ibuf, "$PMGNWPL,", 7) == 0) { - waypoint* wpt = mag_wptparse(ibuf); + Waypoint* wpt = mag_wptparse(ibuf); waypoint_read_count++; if (global_opts.verbose_status) { waypt_status_disp(waypoint_read_count, @@ -514,7 +514,7 @@ retry: } } if (strncmp(ibuf, "$PMGNTRK,", 7) == 0) { - waypoint* wpt = mag_trkparse(ibuf); + Waypoint* wpt = mag_trkparse(ibuf); /* * Allow lazy allocation of track head. */ @@ -961,7 +961,7 @@ void parse_istring(char* istring) * $PMGNTRK,3605.259,N,08644.389,W,00151,M,201444.61,A,,020302*66 * create and return a populated waypoint. */ -waypoint* +Waypoint* mag_trkparse(char* trkmsg) { double latdeg, lngdeg; @@ -972,9 +972,9 @@ mag_trkparse(char* trkmsg) int hms; int fracsecs; struct tm tm; - waypoint* waypt; + Waypoint* waypt; - waypt = new waypoint; + waypt = new Waypoint; memset(&tm, 0, sizeof(tm)); @@ -1142,20 +1142,20 @@ mag_rteparse(char* rtemsg) QUEUE_FOR_EACH(&mag_rte_head->Q, elem, tmp) { mag_rte_elem* re = (mag_rte_elem*) elem; - waypoint* waypt; + Waypoint* waypt; queue* welem, *wtmp; /* * Copy route points from temp wpt queue. */ QUEUE_FOR_EACH(&rte_wpt_tmp, welem, wtmp) { - waypt = (waypoint*)welem; + waypt = (Waypoint*)welem; #if NEW_STRINGS if (waypt->shortname == re->wpt_name) { #else if (strcmp(waypt->shortname, re->wpt_name) == 0) { #endif - waypoint* wpt = new waypoint(*waypt); + Waypoint* wpt = new Waypoint(*waypt); route_add_wpt(rte_head, wpt); break; } @@ -1215,7 +1215,7 @@ mag_find_token_from_descr(const QString& icon) * $PMGNWPL,3549.499,N,08650.827,W,0000257,M,HOME,HOME,c*4D * create and return a populated waypoint. */ -static waypoint* +static Waypoint* mag_wptparse(char* trkmsg) { double latdeg, lngdeg; @@ -1226,7 +1226,7 @@ mag_wptparse(char* trkmsg) char shortname[100]; char descr[256]; char icon_token[100]; - waypoint* waypt; + Waypoint* waypt; char* icons; char* icone; char* blah; @@ -1235,7 +1235,7 @@ mag_wptparse(char* trkmsg) descr[0] = 0; icon_token[0] = 0; - waypt = new waypoint; + waypt = new Waypoint; sscanf(trkmsg,"$PMGNWPL,%lf,%c,%lf,%c,%d,%c,%[^,],%[^,]", &latdeg,&latdir, @@ -1355,7 +1355,7 @@ mag_read(void) static void -mag_waypt_pr(const waypoint* waypointp) +mag_waypt_pr(const Waypoint* waypointp) { double lon, lat; double ilon, ilat; @@ -1453,7 +1453,7 @@ void mag_track_nop(const route_head*) } static -void mag_track_disp(const waypoint* waypointp) +void mag_track_disp(const Waypoint* waypointp) { double ilon, ilat; double lon, lat; @@ -1527,7 +1527,7 @@ static void mag_route_trl(const route_head* rte) { queue* elem, *tmp; - waypoint* waypointp; + Waypoint* waypointp; char obuff[256]; char buff1[64], buff2[64]; char* pbuff, *owpt; @@ -1545,7 +1545,7 @@ mag_route_trl(const route_head* rte) thisline = i = 0; QUEUE_FOR_EACH(&rte->waypoint_list, elem, tmp) { - waypointp = (waypoint*) elem; + waypointp = (Waypoint*) elem; i++; if (deficon) { diff --git a/gpsbabel/main.cc b/gpsbabel/main.cc index 1bb72abd8..6d48a3afd 100644 --- a/gpsbabel/main.cc +++ b/gpsbabel/main.cc @@ -689,7 +689,7 @@ main(int argc, char* argv[]) tracking_status.request_terminate = 0; while (!tracking_status.request_terminate) { - waypoint* wpt; + Waypoint* wpt; wpt = ivecs->position_ops.rd_position(&tracking_status); diff --git a/gpsbabel/mapasia.cc b/gpsbabel/mapasia.cc index 5166e7dc1..915c7dd5e 100644 --- a/gpsbabel/mapasia.cc +++ b/gpsbabel/mapasia.cc @@ -47,7 +47,7 @@ #define TR7_S_FIX 29 static gbfile* fin, *fout; -static const waypoint* wpt_tmp; +static const Waypoint* wpt_tmp; static const route_head* trk_tmp; static int course_tmp, speed_tmp; @@ -71,7 +71,7 @@ tr7_read(void) { route_head* trk = NULL; unsigned int magic; - waypoint* prev = NULL; + Waypoint* prev = NULL; magic = gbfgetint32(fin); if (magic != TR7_TRACK_MAGIC) { @@ -81,7 +81,7 @@ tr7_read(void) while (! gbfeof(fin)) { unsigned char buff[TR7_S_SIZE]; double lat, lon; - waypoint* wpt; + Waypoint* wpt; float speed, course; gbfread(buff, 1, sizeof(buff), fin); @@ -110,7 +110,7 @@ tr7_read(void) continue; } - wpt = new waypoint; + wpt = new Waypoint; wpt->latitude = lat; wpt->longitude = lon; @@ -158,7 +158,7 @@ tr7_check_after_read_head_cb(const route_head* trk) } static void -tr7_check_after_read_wpt_cb(const waypoint* wpt) +tr7_check_after_read_wpt_cb(const Waypoint* wpt) { if (wpt->speed != 0) { speed_tmp = 1; @@ -173,7 +173,7 @@ tr7_check_after_read_trailer_cb(const route_head* trk) { queue* elem, *tmp; QUEUE_FOR_EACH((queue*)&trk->waypoint_list, elem, tmp) { - waypoint* wpt = (waypoint*)elem; + Waypoint* wpt = (Waypoint*)elem; if (speed_tmp == 0) { WAYPT_UNSET(wpt, speed); } @@ -205,7 +205,7 @@ tr7_disp_track_head_cb(const route_head* trk) } static void -tr7_disp_waypt_cb(const waypoint* wpt) +tr7_disp_waypt_cb(const Waypoint* wpt) { unsigned char buff[TR7_S_SIZE]; double speed, course; diff --git a/gpsbabel/mapbar_track.cc b/gpsbabel/mapbar_track.cc index aa152a310..4b72828fb 100644 --- a/gpsbabel/mapbar_track.cc +++ b/gpsbabel/mapbar_track.cc @@ -64,13 +64,13 @@ read_datetime(void) } static const double DIV_RATE = 100000.0f; -static waypoint* +static Waypoint* read_waypoint(void) { int longitude = gbfgetint32(fin); int latitude = gbfgetint32(fin); - waypoint* ret = new waypoint; + Waypoint* ret = new Waypoint; ret->latitude = double(latitude)/DIV_RATE; ret->longitude = double(longitude)/DIV_RATE; @@ -115,7 +115,7 @@ mapbar_track_read(void) const int amount = length/8; for (int i = 0; i < amount; ++i) { - waypoint* tmp = read_waypoint(); + Waypoint* tmp = read_waypoint(); track_add_wpt(track, tmp); } diff --git a/gpsbabel/mapsend.cc b/gpsbabel/mapsend.cc index 91623c5a0..a13d735bf 100644 --- a/gpsbabel/mapsend.cc +++ b/gpsbabel/mapsend.cc @@ -115,13 +115,13 @@ mapsend_wpt_read(void) int wpt_number; char wpt_icon; char wpt_status; - waypoint* wpt_tmp; + Waypoint* wpt_tmp; route_head* rte_head; wpt_count = gbfgetint32(mapsend_file_in); while (wpt_count--) { - wpt_tmp = new waypoint; + wpt_tmp = new Waypoint; wpt_tmp->shortname = gbfgetpstr(mapsend_file_in); wpt_tmp->description = gbfgetpstr(mapsend_file_in); @@ -162,7 +162,7 @@ mapsend_wpt_read(void) wpt_count = gbfgetint32(mapsend_file_in); while (wpt_count--) { - wpt_tmp = new waypoint; + wpt_tmp = new Waypoint; /* waypoint name */ wpt_tmp->shortname = gbfgetpstr(mapsend_file_in); @@ -193,7 +193,7 @@ mapsend_track_read(void) int valid; unsigned char centisecs; route_head* track_head; - waypoint* wpt_tmp; + Waypoint* wpt_tmp; track_head = route_head_alloc(); track_head->rte_name = gbfgetpstr(mapsend_file_in); @@ -202,7 +202,7 @@ mapsend_track_read(void) trk_count = gbfgetuint32(mapsend_file_in); while (trk_count--) { - wpt_tmp = new waypoint; + wpt_tmp = new Waypoint; wpt_tmp->longitude = gbfgetdbl(mapsend_file_in); wpt_tmp->latitude = -gbfgetdbl(mapsend_file_in); @@ -270,7 +270,7 @@ mapsend_read(void) static void -mapsend_waypt_pr(const waypoint* waypointp) +mapsend_waypt_pr(const Waypoint* waypointp) { unsigned int c = 0; double falt; @@ -385,7 +385,7 @@ mapsend_noop(const route_head* wp) } static void -mapsend_route_disp(const waypoint* waypointp) +mapsend_route_disp(const Waypoint* waypointp) { unsigned char c; QString iconp; @@ -483,7 +483,7 @@ void mapsend_track_hdr(const route_head* trk) } -void mapsend_track_disp(const waypoint* wpt) +void mapsend_track_disp(const Waypoint* wpt) { unsigned char c; int32_t t; diff --git a/gpsbabel/mapsource.cc b/gpsbabel/mapsource.cc index 491e8f434..e2bfb9916 100644 --- a/gpsbabel/mapsource.cc +++ b/gpsbabel/mapsource.cc @@ -42,7 +42,7 @@ static int mps_ver_temp = 0; static char* tempname; static char* fin_name; -static const waypoint* prevRouteWpt; +static const Waypoint* prevRouteWpt; /* Private queues of written out waypoints */ static queue written_wpt_head; static queue written_route_wpt_head; @@ -125,7 +125,7 @@ mps_wpt_q_deinit(queue* whichQueue) queue* elem, *tmp; QUEUE_FOR_EACH(whichQueue, elem, tmp) { - waypoint* q = (waypoint*) dequeue(elem); + Waypoint* q = (Waypoint*) dequeue(elem); delete q; } } @@ -134,14 +134,14 @@ mps_wpt_q_deinit(queue* whichQueue) * Find a waypoint that we've already written out * */ -waypoint* +Waypoint* mps_find_wpt_q_by_name(const queue* whichQueue, const QString& name) { queue* elem, *tmp; - waypoint* waypointp; + Waypoint* waypointp; QUEUE_FOR_EACH(whichQueue, elem, tmp) { - waypointp = (waypoint*) elem; + waypointp = (Waypoint*) elem; if (waypointp->shortname == name) { return waypointp; } @@ -154,9 +154,9 @@ mps_find_wpt_q_by_name(const queue* whichQueue, const QString& name) * */ void -mps_wpt_q_add(const queue* whichQueue, const waypoint* wpt) +mps_wpt_q_add(const queue* whichQueue, const Waypoint* wpt) { - waypoint* written_wpt = new waypoint(*wpt); + Waypoint* written_wpt = new Waypoint(*wpt); ENQUEUE_TAIL(whichQueue, &written_wpt->Q); } @@ -513,7 +513,7 @@ mps_mapsetname_w(gbfile* mps_file, int mps_ver) * MRCB */ static void -mps_waypoint_r(gbfile* mps_file, int mps_ver, waypoint** wpt, unsigned int* mpsclass) +mps_waypoint_r(gbfile* mps_file, int mps_ver, Waypoint** wpt, unsigned int* mpsclass) { char tbuf[100]; char wptname[MPSNAMEBUFFERLEN]; @@ -522,12 +522,12 @@ mps_waypoint_r(gbfile* mps_file, int mps_ver, waypoint** wpt, unsigned int* mpsc int icon; int dynamic; - waypoint* thisWaypoint = NULL; + Waypoint* thisWaypoint = NULL; double mps_altitude = unknown_alt; double mps_proximity = unknown_alt; double mps_depth = unknown_alt; - thisWaypoint = new waypoint; + thisWaypoint = new Waypoint; *wpt = thisWaypoint; mps_readstr(mps_file, wptname, sizeof(wptname)); @@ -611,7 +611,7 @@ mps_waypoint_r(gbfile* mps_file, int mps_ver, waypoint** wpt, unsigned int* mpsc * MRCB */ static void -mps_waypoint_w(gbfile* mps_file, int mps_ver, const waypoint* wpt, const int isRouteWpt) +mps_waypoint_w(gbfile* mps_file, int mps_ver, const Waypoint* wpt, const int isRouteWpt) { int reclen; int lat, lon; @@ -765,9 +765,9 @@ mps_waypoint_w(gbfile* mps_file, int mps_ver, const waypoint* wpt, const int isR * */ static void -mps_waypoint_w_unique_wrapper(const waypoint* wpt) +mps_waypoint_w_unique_wrapper(const Waypoint* wpt) { - waypoint* wptfound = NULL; + Waypoint* wptfound = NULL; /* Search for this waypoint in the ones already written */ wptfound = mps_find_wpt_q_by_name(&written_wpt_head, CSTRc(wpt->shortname)); @@ -795,9 +795,9 @@ mps_waypoint_w_unique_wrapper(const waypoint* wpt) * */ static void -mps_route_wpt_w_unique_wrapper(const waypoint* wpt) +mps_route_wpt_w_unique_wrapper(const Waypoint* wpt) { - waypoint* wptfound = NULL; + Waypoint* wptfound = NULL; /* Search for this waypoint in the ones already written */ wptfound = mps_find_wpt_q_by_name(&written_wpt_head, CSTRc(wpt->shortname)); @@ -834,9 +834,9 @@ mps_route_wpt_w_unique_wrapper(const waypoint* wpt) * */ static void -mps_waypoint_w_uniqloc_wrapper(waypoint* wpt) +mps_waypoint_w_uniqloc_wrapper(Waypoint* wpt) { - waypoint* wptfound = NULL; + Waypoint* wptfound = NULL; char* newName; /* Search for this waypoint in the ones already written */ @@ -856,7 +856,7 @@ mps_waypoint_w_uniqloc_wrapper(waypoint* wpt) ((wpt->longitude - wptfound->longitude) != 0)) { /* Not the same lat lon, so rename and add */ newName = mkshort(written_wpt_mkshort_handle, wpt->shortname); - wptfound = new waypoint(*wpt); + wptfound = new Waypoint(*wpt); xfree(wptfound->shortname); wptfound->shortname = newName; mps_waypoint_w(mps_file_out, mps_ver_out, wptfound, (1==0)); @@ -890,8 +890,8 @@ mps_route_r(gbfile* mps_file, int mps_ver, route_head** rte) route_head* rte_head; int rte_count; - waypoint* thisWaypoint; - waypoint* tempWpt; + Waypoint* thisWaypoint; + Waypoint* tempWpt; double mps_altitude = unknown_alt; double mps_depth = unknown_alt; @@ -1008,18 +1008,18 @@ mps_route_r(gbfile* mps_file, int mps_ver, route_head** rte) tempWpt = find_waypt_by_name(wptname); if (tempWpt != NULL) { - thisWaypoint = new waypoint(*tempWpt); + thisWaypoint = new Waypoint(*tempWpt); } else { tempWpt = mps_find_wpt_q_by_name(&read_route_wpt_head, wptname); if (tempWpt != NULL) { - thisWaypoint = new waypoint(*tempWpt); + thisWaypoint = new Waypoint(*tempWpt); } else { /* should never reach here, but we do need a fallback position */ #ifdef MPS_DEBUG fprintf(stderr, "mps_route_r: reached the point we never should\n"); #endif - thisWaypoint = new waypoint; + thisWaypoint = new Waypoint; thisWaypoint->shortname = wptname; thisWaypoint->latitude = GPS_Math_Semi_To_Deg(lat); thisWaypoint->longitude = GPS_Math_Semi_To_Deg(lon); @@ -1095,15 +1095,15 @@ mps_route_r(gbfile* mps_file, int mps_ver, route_head** rte) tempWpt = find_waypt_by_name(wptname); if (tempWpt != NULL) { - thisWaypoint = new waypoint(*tempWpt); + thisWaypoint = new Waypoint(*tempWpt); } else { tempWpt = mps_find_wpt_q_by_name(&read_route_wpt_head, wptname); if (tempWpt != NULL) { - thisWaypoint = new waypoint(*tempWpt); + thisWaypoint = new Waypoint(*tempWpt); } else { /* should never reach here, but we do need a fallback position */ - thisWaypoint = new waypoint; + thisWaypoint = new Waypoint; thisWaypoint->shortname = wptname; thisWaypoint->latitude = GPS_Math_Semi_To_Deg(lat); thisWaypoint->longitude = GPS_Math_Semi_To_Deg(lon); @@ -1130,7 +1130,7 @@ mps_routehdr_w(gbfile* mps_file, int mps_ver, const route_head* rte) char hdr[20]; char zbuf[20]; - waypoint* testwpt; + Waypoint* testwpt; time_t uniqueValue = 0; int allWptNameLengths; @@ -1156,7 +1156,7 @@ mps_routehdr_w(gbfile* mps_file, int mps_ver, const route_head* rte) if (rte->waypoint_list.next) { /* this test doesn't do what I want i.e test if this is a valid route - treat as a placeholder for now */ QUEUE_FOR_EACH(&rte->waypoint_list, elem, tmp) { - testwpt = (waypoint*)elem; + testwpt = (Waypoint*)elem; if (rte_datapoints == 0) { uniqueValue = testwpt->GetCreationTime().toTime_t(); } @@ -1286,7 +1286,7 @@ mps_routehdr_w_wrapper(const route_head* rte) * MRCB */ static void -mps_routedatapoint_w(gbfile* mps_file, int mps_ver, const waypoint* rtewpt) +mps_routedatapoint_w(gbfile* mps_file, int mps_ver, const Waypoint* rtewpt) { int lat; int lon; @@ -1302,7 +1302,7 @@ mps_routedatapoint_w(gbfile* mps_file, int mps_ver, const waypoint* rtewpt) double minalt=-unknown_alt; double mps_altitude; - waypoint* wptfound; + Waypoint* wptfound; memset(zbuf, 0, sizeof(zbuf)); memset(ffbuf, 0xff, sizeof(ffbuf)); @@ -1450,7 +1450,7 @@ mps_routedatapoint_w(gbfile* mps_file, int mps_ver, const waypoint* rtewpt) } static void -mps_routedatapoint_w_wrapper(const waypoint* rte) +mps_routedatapoint_w_wrapper(const Waypoint* rte) { mps_routedatapoint_w(mps_file_out, mps_ver_out, rte); } @@ -1496,7 +1496,7 @@ mps_track_r(gbfile* mps_file, int mps_ver, route_head** trk) route_head* track_head; int trk_count; - waypoint* thisWaypoint; + Waypoint* thisWaypoint; double mps_altitude = unknown_alt; double mps_depth = unknown_alt; @@ -1553,7 +1553,7 @@ mps_track_r(gbfile* mps_file, int mps_ver, route_head** trk) gbfseek(mps_file, 8, SEEK_CUR); } - thisWaypoint = new waypoint; + thisWaypoint = new Waypoint; thisWaypoint->latitude = GPS_Math_Semi_To_Deg(lat); thisWaypoint->longitude = GPS_Math_Semi_To_Deg(lon); thisWaypoint->SetCreationTime(dateTime); @@ -1582,7 +1582,7 @@ mps_trackhdr_w(gbfile* mps_file, int mps_ver, const route_head* trk) int tname_len; char* tname; char hdr[20]; - waypoint* testwpt; + Waypoint* testwpt; time_t uniqueValue = 0; queue* elem, *tmp; @@ -1594,7 +1594,7 @@ mps_trackhdr_w(gbfile* mps_file, int mps_ver, const route_head* trk) if (trk->waypoint_list.next) { /* this test doesn't do what I want i.e test if this is a valid track - treat as a placeholder for now */ QUEUE_FOR_EACH(&trk->waypoint_list, elem, tmp) { if (trk_datapoints == 0) { - testwpt = (waypoint*)elem; + testwpt = (Waypoint*)elem; uniqueValue = testwpt->GetCreationTime().toTime_t(); } trk_datapoints++; @@ -1647,7 +1647,7 @@ mps_trackhdr_w_wrapper(const route_head* trk) * MRCB */ static void -mps_trackdatapoint_w(gbfile* mps_file, int mps_ver, const waypoint* wpt) +mps_trackdatapoint_w(gbfile* mps_file, int mps_ver, const Waypoint* wpt) { int lat, lon; time_t t = wpt->GetCreationTime().toTime_t(); @@ -1692,7 +1692,7 @@ mps_trackdatapoint_w(gbfile* mps_file, int mps_ver, const waypoint* wpt) } static void -mps_trackdatapoint_w_wrapper(const waypoint* wpt) +mps_trackdatapoint_w_wrapper(const Waypoint* wpt) { mps_trackdatapoint_w(mps_file_out, mps_ver_out, wpt); } @@ -1701,7 +1701,7 @@ mps_trackdatapoint_w_wrapper(const waypoint* wpt) static void mps_read(void) { - waypoint* wpt; + Waypoint* wpt; route_head* rte; route_head* trk; @@ -1826,7 +1826,7 @@ void mps_write(void) { int short_length; - waypoint* wpt; + Waypoint* wpt; route_head* rte; route_head* trk; diff --git a/gpsbabel/mkshort.cc b/gpsbabel/mkshort.cc index 167c1de63..5d92cfeca 100644 --- a/gpsbabel/mkshort.cc +++ b/gpsbabel/mkshort.cc @@ -586,7 +586,7 @@ mkshort(short_handle h, const QString& istring) * the code that considers the alternate sources. */ String -mkshort_from_wpt(short_handle h, const waypoint* wpt) +mkshort_from_wpt(short_handle h, const Waypoint* wpt) { /* This probably came from a Groundspeak Pocket Query * so use the 'cache name' instead of the description field diff --git a/gpsbabel/mmo.cc b/gpsbabel/mmo.cc index 4a0eb4ce6..c71d82c43 100644 --- a/gpsbabel/mmo.cc +++ b/gpsbabel/mmo.cc @@ -317,14 +317,14 @@ mmo_get_object(const uint16_t objid) return objects.value(key); } -static waypoint* +static Waypoint* mmo_get_waypt(mmo_data_t* data) { data->refct++; if (data->refct == 1) { - return (waypoint*)data->data; + return (Waypoint*)data->data; } else { - return new waypoint(*(waypoint*)data->data); + return new Waypoint(*(Waypoint*)data->data); } } @@ -335,7 +335,7 @@ mmo_free_object(mmo_data_t* data) xfree(data->name); } if ((data->type == wptdata) && (data->refct == 0)) { - delete (waypoint*)data->data; + delete (Waypoint*)data->data; } xfree(data); } @@ -448,7 +448,7 @@ mmo_read_CObjWaypoint(mmo_data_t* data) #ifdef MMO_DBG const char* sobj = "CObjWaypoint"; #endif - waypoint* wpt; + Waypoint* wpt; time_t time; int rtelinks; mmo_data_t** rtelink = NULL; @@ -460,7 +460,7 @@ mmo_read_CObjWaypoint(mmo_data_t* data) DBG((sobj, "name = \"%s\" [ visible=%s, id=0x%04X ]\n", data->name, data->visible ? "yes" : "NO", data->objid)); - data->data = wpt = new waypoint; + data->data = wpt = new Waypoint; wpt->shortname = QString::fromLatin1(data->name); time = data->mtime; @@ -630,12 +630,12 @@ mmo_read_CObjRoute(mmo_data_t* data) DBG((sobj, "read next waypoint\n")); tmp = mmo_read_object(); if (tmp && tmp->data && (tmp->type = wptdata)) { - waypoint* wpt; + Waypoint* wpt; /* FIXME: At this point this waypoint maybe not fully loaded (initialized) !!! We need a final procedure to handle this !!! */ if (! tmp->loaded) { - wpt = new waypoint; + wpt = new Waypoint; wpt->latitude = 0; wpt->longitude = 0; xasprintf(&wpt->shortname, "\01%p", tmp); @@ -687,10 +687,10 @@ mmo_read_CObjTrack(mmo_data_t* data) DBG((sobj, "track has %d point(s)\n", tp)); for (ctp = 0; ctp < tp; ctp++) { - waypoint* wpt; + Waypoint* wpt; char unk; - wpt = new waypoint; + wpt = new Waypoint; wpt->latitude = gbfgetdbl(fin); wpt->longitude = gbfgetdbl(fin); @@ -961,20 +961,20 @@ mmo_read_object(void) } static void -mmo_finalize_rtept_cb(const waypoint* wptref) +mmo_finalize_rtept_cb(const Waypoint* wptref) { - waypoint* wpt = (waypoint*)wptref; + Waypoint* wpt = (Waypoint*)wptref; if ((wpt->shortname[0] == 1) && (wpt->latitude == 0) && (wpt->longitude == 0)) { mmo_data_t* data; - waypoint* wpt2; + Waypoint* wpt2; #if NEW_STRINGS #warning this code is on drugs. abort(); #else sscanf(wpt->shortname + 1, "%p", &data); #endif - wpt2 = (waypoint*)data->data; + wpt2 = (Waypoint*)data->data; wpt->latitude = wpt2->latitude; wpt->longitude = wpt2->longitude; @@ -1145,7 +1145,7 @@ mmo_writestr(const char* str) static void -mmo_enum_waypt_cb(const waypoint* wpt) +mmo_enum_waypt_cb(const Waypoint* wpt) { mmo_obj_ct++; } @@ -1228,7 +1228,7 @@ mmo_write_obj_head(const char* sobj, const char* name, const time_t ctime, static void -mmo_write_wpt_cb(const waypoint* wpt) +mmo_write_wpt_cb(const Waypoint* wpt) { char* str; String cx; @@ -1349,7 +1349,7 @@ mmo_write_rte_head_cb(const route_head* rte) mmo_rte = (route_head*)rte; QUEUE_FOR_EACH(&rte->waypoint_list, elem, tmp) { - waypoint* wpt = (waypoint*)elem; + Waypoint* wpt = (Waypoint*)elem; QDateTime t = wpt->GetCreationTime(); if ((t.isValid()) && (t.toTime_t() < time)) { time = t.toTime_t(); @@ -1398,7 +1398,7 @@ mmo_write_rte_tail_cb(const route_head* rte) } QUEUE_FOR_EACH(&rte->waypoint_list, elem, tmp) { - waypoint* wpt = (waypoint*)elem; + Waypoint* wpt = (Waypoint*)elem; int objid = mmo_get_objid(wpt); gbfputuint16(objid & 0x7FFF, fout); } diff --git a/gpsbabel/mtk_locus.cc b/gpsbabel/mtk_locus.cc index a04ec73db..299fbfa92 100644 --- a/gpsbabel/mtk_locus.cc +++ b/gpsbabel/mtk_locus.cc @@ -348,8 +348,8 @@ process_pmtklox() int wordnum; int bytenum; int fixnum; - static waypoint* trkpt; - static waypoint* waypt; + static Waypoint* trkpt; + static Waypoint* waypt; token = strtok(line, ","); if ((token == NULL) || (strcmp(token, "$PMTKLOX") != 0)) { @@ -436,7 +436,7 @@ process_pmtklox() } if (global_opts.masked_objective & TRKDATAMASK) { - trkpt = new waypoint; + trkpt = new Waypoint; trkpt->SetCreationTime(timestamp); trkpt->latitude = latitude; trkpt->longitude = longitude; @@ -448,7 +448,7 @@ process_pmtklox() } if (global_opts.masked_objective & WPTDATAMASK) { - waypt = new waypoint; + waypt = new Waypoint; waypt->SetCreationTime(timestamp); waypt->latitude = latitude; waypt->longitude = longitude; diff --git a/gpsbabel/mtk_logger.cc b/gpsbabel/mtk_logger.cc index a70713b49..573ab8b0b 100644 --- a/gpsbabel/mtk_logger.cc +++ b/gpsbabel/mtk_logger.cc @@ -747,7 +747,7 @@ mtk_retry: static route_head* trk_head = NULL; static int add_trackpoint(int idx, unsigned long bmask, struct data_item* itm) { - waypoint* trk = new waypoint; + Waypoint* trk = new Waypoint; if (global_opts.masked_objective& TRKDATAMASK && (trk_head == NULL || (mtk_info.track_event & MTK_EVT_START))) { char spds[50]; @@ -842,7 +842,7 @@ static int add_trackpoint(int idx, unsigned long bmask, struct data_item* itm) ) ) { /* Button press -- create waypoint, start count at 1 */ - waypoint* w = new waypoint(*trk); + Waypoint* w = new Waypoint(*trk); w->shortname = QString().sprintf("WP%06d", waypt_count()+1); waypt_add(w); diff --git a/gpsbabel/navicache.cc b/gpsbabel/navicache.cc index 61a327569..6ff5c4dd6 100644 --- a/gpsbabel/navicache.cc +++ b/gpsbabel/navicache.cc @@ -100,7 +100,7 @@ static void NaviReadCache(const QXmlStreamReader& reader) { const QXmlStreamAttributes a = reader.attributes(); - waypoint* wpt_tmp = new waypoint; + Waypoint* wpt_tmp = new Waypoint; geocache_data* gc_data; gc_data = wpt_tmp->AllocGCData(); if (a.hasAttribute("cache_id")) { diff --git a/gpsbabel/naviguide.cc b/gpsbabel/naviguide.cc index 7352f1751..f78b0ef4b 100644 --- a/gpsbabel/naviguide.cc +++ b/gpsbabel/naviguide.cc @@ -113,7 +113,7 @@ arglist_t ng_args[] = { /*===================Utilities ==========================================*/ static void -ng_convert_datum(waypoint* wpt) +ng_convert_datum(Waypoint* wpt) { double lat, lon, east, north, alt; @@ -237,7 +237,7 @@ ng_fill_waypoint_default(void) static void -ng_waypt_rd(const waypoint* wpt) +ng_waypt_rd(const Waypoint* wpt) { char z[50]; double lat, lon; @@ -383,7 +383,7 @@ data_read(void) for (int n = 0; n < nof_wp; ++n) { - waypoint* wpt_tmp = new waypoint; + Waypoint* wpt_tmp = new Waypoint; /* Read waypoint data */ diff --git a/gpsbabel/navilink.cc b/gpsbabel/navilink.cc index 34497ddf6..3ff7c2000 100644 --- a/gpsbabel/navilink.cc +++ b/gpsbabel/navilink.cc @@ -43,7 +43,7 @@ static unsigned char* track_data; static unsigned char* track_data_ptr; static unsigned char* track_data_end; static unsigned track_serial; -static waypoint** route_waypts; +static Waypoint** route_waypts; static unsigned* route_ids; static unsigned route_id_ptr; @@ -165,12 +165,12 @@ arglist_t navilink_args[] = { ARG_TERMINATOR }; -static void (*write_waypoint)(const waypoint*) = NULL; +static void (*write_waypoint)(const Waypoint*) = NULL; static void (*write_track_start)(const route_head* track) = NULL; -static void (*write_track_point)(const waypoint* waypt) = NULL; +static void (*write_track_point)(const Waypoint* waypt) = NULL; static void (*write_track_end)(const route_head* track) = NULL; static void (*write_route_start)(const route_head* track) = NULL; -static void (*write_route_point)(const waypoint* waypt) = NULL; +static void (*write_route_point)(const Waypoint* waypt) = NULL; static void (*write_route_end)(const route_head* track) = NULL; static int @@ -188,9 +188,9 @@ find_icon_from_descr(const QString& descr) } static void -free_waypoints(waypoint** waypts) +free_waypoints(Waypoint** waypts) { - waypoint** wayptp; + Waypoint** wayptp; for (wayptp = waypts; wayptp < waypts + MAX_WAYPOINTS; wayptp++) { if (*wayptp) { @@ -202,7 +202,7 @@ free_waypoints(waypoint** waypts) } static unsigned -compare_waypoints(const waypoint* waypt1, const waypoint* waypt2) +compare_waypoints(const Waypoint* waypt1, const Waypoint* waypt2) { return waypt1->latitude == waypt2->latitude && waypt1->longitude == waypt2->longitude && @@ -380,7 +380,7 @@ encode_datetime(time_t datetime, unsigned char* buffer) } static void -decode_position(const unsigned char* buffer, waypoint* waypt) +decode_position(const unsigned char* buffer, Waypoint* waypt) { waypt->latitude = le_read32(buffer + 0) / 10000000.0; waypt->longitude = le_read32(buffer + 4) / 10000000.0; @@ -388,7 +388,7 @@ decode_position(const unsigned char* buffer, waypoint* waypt) } static void -encode_position(const waypoint* waypt, unsigned char* buffer) +encode_position(const Waypoint* waypt, unsigned char* buffer) { le_write32(buffer + 0, (int)(waypt->latitude * 10000000)); le_write32(buffer + 4, (int)(waypt->longitude * 10000000)); @@ -407,10 +407,10 @@ decode_waypoint_id(const unsigned char* buffer) return id; } -static waypoint* +static Waypoint* decode_waypoint(const unsigned char* buffer) { - waypoint* waypt = new waypoint; + Waypoint* waypt = new Waypoint; decode_position(buffer + 12, waypt); char* s = xstrdup((char*)buffer + 4); @@ -423,7 +423,7 @@ decode_waypoint(const unsigned char* buffer) } static void -encode_waypoint(const waypoint* waypt, unsigned char* buffer) +encode_waypoint(const Waypoint* waypt, unsigned char* buffer) { buffer[0] = 0x00; buffer[1] = 0x40; @@ -439,10 +439,10 @@ encode_waypoint(const waypoint* waypt, unsigned char* buffer) buffer[31] = 0x7e; } -static waypoint* +static Waypoint* decode_trackpoint(const unsigned char* buffer) { - waypoint* waypt = new waypoint; + Waypoint* waypt = new Waypoint; decode_position(buffer + 12, waypt); waypt->SetCreationTime(decode_datetime(buffer + 22)); @@ -453,7 +453,7 @@ decode_trackpoint(const unsigned char* buffer) } static void -encode_trackpoint(const waypoint* waypt, unsigned serial, unsigned char* buffer) +encode_trackpoint(const Waypoint* waypt, unsigned serial, unsigned char* buffer) { double x; double y; @@ -474,16 +474,16 @@ encode_trackpoint(const waypoint* waypt, unsigned serial, unsigned char* buffer) buffer[31] = 0x7e; } -static waypoint** +static Waypoint** serial_read_waypoints(void) { - waypoint** waypts = NULL; + Waypoint** waypts = NULL; unsigned char information[32]; unsigned short total; unsigned short start; if (global_opts.masked_objective & RTEDATAMASK) { - waypts = (waypoint**) xcalloc(MAX_WAYPOINTS, sizeof(waypoint*)); + waypts = (Waypoint**) xcalloc(MAX_WAYPOINTS, sizeof(Waypoint*)); } write_packet(PID_QRY_INFORMATION, NULL, 0); @@ -533,7 +533,7 @@ serial_read_waypoints(void) } static unsigned int -serial_write_waypoint_packet(const waypoint* waypt) +serial_write_waypoint_packet(const Waypoint* waypt) { unsigned char data[32]; unsigned char id[2]; @@ -548,7 +548,7 @@ serial_write_waypoint_packet(const waypoint* waypt) } static void -serial_write_waypoint(const waypoint* waypt) +serial_write_waypoint(const Waypoint* waypt) { serial_write_waypoint_packet(waypt); } @@ -637,7 +637,7 @@ serial_write_track_start(const route_head* track) } static void -serial_write_track_point(const waypoint* waypt) +serial_write_track_point(const Waypoint* waypt) { if (track_data_ptr >= track_data_end) { serial_write_track(); @@ -659,7 +659,7 @@ serial_write_track_end(const route_head* track) } static void -serial_read_routes(waypoint** waypts) +serial_read_routes(Waypoint** waypts) { unsigned char information[32]; unsigned char routec; @@ -704,7 +704,7 @@ serial_read_routes(waypoint** waypts) } else if (waypts[id] == NULL) { fatal(MYNAME ": Non-existent waypoint in route\n"); } else { - route_add_wpt(route, new waypoint(*waypts[id])); + route_add_wpt(route, new Waypoint(*waypts[id])); } } } @@ -719,7 +719,7 @@ serial_write_route_start(const route_head* route) } static void -serial_write_route_point(const waypoint* waypt) +serial_write_route_point(const Waypoint* waypt) { unsigned w; @@ -731,7 +731,7 @@ serial_write_route_point(const waypoint* waypt) if (w == MAX_WAYPOINTS) { w = serial_write_waypoint_packet(waypt); - route_waypts[w] = new waypoint(*waypt); + route_waypts[w] = new Waypoint(*waypt); } route_ids[route_id_ptr++] = w; @@ -839,18 +839,18 @@ decode_sbp_datetime_packed(const unsigned char* buffer) } static void -decode_sbp_position(const unsigned char* buffer, waypoint* waypt) +decode_sbp_position(const unsigned char* buffer, Waypoint* waypt) { waypt->latitude = le_read32(buffer + 0) / 10000000.0; waypt->longitude = le_read32(buffer + 4) / 10000000.0; waypt->altitude = le_read32(buffer + 8) / 100.0; } -waypoint* +Waypoint* navilink_decode_logpoint(const unsigned char* buffer) { - waypoint* waypt = NULL; - waypt = new waypoint; + Waypoint* waypt = NULL; + waypt = new Waypoint; waypt->hdop = ((unsigned char)buffer[0]) * 0.2f; waypt->sat = buffer[1]; @@ -996,7 +996,7 @@ file_read(void) } static void -file_write_waypoint(const waypoint* waypt) +file_write_waypoint(const Waypoint* waypt) { unsigned char data[32]; @@ -1011,7 +1011,7 @@ file_write_track_start(const route_head* track) } static void -file_write_track_point(const waypoint* waypt) +file_write_track_point(const Waypoint* waypt) { unsigned char data[32]; @@ -1031,7 +1031,7 @@ file_write_route_start(const route_head* track) } static void -file_write_route_point(const waypoint* waypt) +file_write_route_point(const Waypoint* waypt) { } @@ -1186,7 +1186,7 @@ navilink_read(void) } } else { if (serial_handle) { - waypoint** waypts = NULL; + Waypoint** waypts = NULL; if (global_opts.masked_objective & (WPTDATAMASK|RTEDATAMASK)) { waypts = serial_read_waypoints(); diff --git a/gpsbabel/navilink.h b/gpsbabel/navilink.h index c985f0528..05ef375bb 100644 --- a/gpsbabel/navilink.h +++ b/gpsbabel/navilink.h @@ -29,7 +29,7 @@ #define SBP_RECORD_LEN 32 /* defined in navilink.c */ -waypoint* navilink_decode_logpoint(const unsigned char* buffer); +Waypoint* navilink_decode_logpoint(const unsigned char* buffer); unsigned navilink_checksum_packet(const unsigned char* packet, unsigned length); /* defined in sbn.c */ diff --git a/gpsbabel/navitel.cc b/gpsbabel/navitel.cc index 80e03a79f..2d452c1de 100644 --- a/gpsbabel/navitel.cc +++ b/gpsbabel/navitel.cc @@ -57,12 +57,12 @@ navitel_read_track(void) for (i = 0; i < points; i++) { int lat, lon; - waypoint* wpt; + Waypoint* wpt; lon = gbfgetint32(fin); lat = gbfgetint32(fin); - wpt = new waypoint; + wpt = new Waypoint; wpt->latitude = GPS_Math_Semi_To_Deg(lat & 0x7FFFFFFF); wpt->longitude = GPS_Math_Semi_To_Deg(lon); @@ -87,7 +87,7 @@ navitel_wr_deinit(void) } static void -navitel_enum_trkpts(const waypoint* wpt) +navitel_enum_trkpts(const Waypoint* wpt) { trkpts++; } @@ -99,7 +99,7 @@ navitel_disp_trk_head(const route_head* trk) } static void -navitel_disp_trkpts(const waypoint* wpt) +navitel_disp_trkpts(const Waypoint* wpt) { int lat, lon; diff --git a/gpsbabel/netstumbler.cc b/gpsbabel/netstumbler.cc index 5c07feccc..330667cc8 100644 --- a/gpsbabel/netstumbler.cc +++ b/gpsbabel/netstumbler.cc @@ -82,7 +82,7 @@ data_read(void) char mac[2 + 17 + 2 + 1]; /* "( " + MAC + " )" + null */ char desc[sizeof ssid - 1 + 15 + 1]; /* room for channel/speed */ double lat = 0, lon = 0; - waypoint* wpt_tmp; + Waypoint* wpt_tmp; int line_no = 0; int stealth_num = 0, whitespace_num = 0; long flags = 0; @@ -209,7 +209,7 @@ data_read(void) continue; } - wpt_tmp = new waypoint; + wpt_tmp = new Waypoint; if (stealth) { if (!snmac) { @@ -249,7 +249,7 @@ data_read(void) typedef struct { unsigned long crc; - waypoint* wpt; + Waypoint* wpt; } htable_t; static @@ -274,8 +274,8 @@ compare(const void* a, const void* b) * to make the testo script happy. * */ - waypoint* wpt_a = ((const htable_t*)a)->wpt; - waypoint* wpt_b = ((const htable_t*)b)->wpt; + Waypoint* wpt_a = ((const htable_t*)a)->wpt; + Waypoint* wpt_b = ((const htable_t*)b)->wpt; #if NEW_STRINGS return wpt_a->description.compare(wpt_b->description); #else @@ -304,14 +304,14 @@ fix_netstumbler_dupes(void) #if NEWQ // Why, oh, why is this format running over the entire waypoint list and // modifying it? This seems wrong. - extern QList waypt_list; - foreach(waypoint* waypointp, waypt_list) { + extern QList waypt_list; + foreach(Waypoint* waypointp, waypt_list) { bh->wpt = waypointp; #else queue* elem, *tmp; extern queue waypt_head; QUEUE_FOR_EACH(&waypt_head, elem, tmp) { - bh->wpt = (waypoint*) elem; + bh->wpt = (Waypoint*) elem; #endif QString snptr = bh->wpt->shortname; QString tmp_sn = snptr.toLower(); diff --git a/gpsbabel/nmea.cc b/gpsbabel/nmea.cc index 588e38553..380ad31ee 100644 --- a/gpsbabel/nmea.cc +++ b/gpsbabel/nmea.cc @@ -153,8 +153,8 @@ static route_head* trk_head; static short_handle mkshort_handle; static preferred_posn_type posn_type; static struct tm tm; -static waypoint* curr_waypt; -static waypoint* last_waypt; +static Waypoint* curr_waypt; +static Waypoint* last_waypt; static void* gbser_handle; static const char* posn_fname; static queue pcmpt_head; @@ -187,7 +187,7 @@ static double last_read_time; /* Last timestamp of GGA or PRMC */ static int datum; static int had_checksum; -static waypoint* nmea_rd_posn(posn_status*); +static Waypoint* nmea_rd_posn(posn_status*); static void nmea_rd_posn_init(const char* fname); arglist_t nmea_args[] = { @@ -227,7 +227,7 @@ nmea_cksum(const char* const buf) } static void -nmea_add_wpt(waypoint* wpt, route_head* trk) +nmea_add_wpt(Waypoint* wpt, route_head* trk) { if (datum != DATUM_WGS84) { double lat, lon, alt; @@ -245,7 +245,7 @@ nmea_add_wpt(waypoint* wpt, route_head* trk) } static void -nmea_release_wpt(waypoint* wpt) +nmea_release_wpt(Waypoint* wpt) { if (wpt && ((wpt->Q.next == NULL) || (wpt->Q.next == &wpt->Q))) { /* This waypoint isn't queued. @@ -280,7 +280,7 @@ nmea_rd_init(const char* fname) * it as one waypoint. */ if (getposn) { - waypoint* wpt; + Waypoint* wpt; posn_status st; nmea_rd_posn_init(fname); wpt = nmea_rd_posn(&st); @@ -353,7 +353,7 @@ nmea_wr_deinit(void) } static void -nmea_set_waypoint_time(waypoint* wpt, struct tm* time, double fsec) +nmea_set_waypoint_time(Waypoint* wpt, struct tm* time, double fsec) { if (time->tm_year == 0) { wpt->SetCreationTime(((((time_t)time->tm_hour * 60) + time->tm_min) * 60) + time->tm_sec, lround(1000.0 * fsec)); @@ -379,7 +379,7 @@ gpgll_parse(char* ibuf) double hmsd; int hms; char valid = 0; - waypoint* waypt; + Waypoint* waypt; if (trk_head == NULL) { trk_head = route_head_alloc(); @@ -405,7 +405,7 @@ gpgll_parse(char* ibuf) hms = hms / 100; tm.tm_hour = hms % 100; - waypt = new waypoint; + waypt = new Waypoint; nmea_set_waypoint_time(waypt, &tm, fsec); @@ -434,7 +434,7 @@ gpgga_parse(char* ibuf) int nsats = 0; double hdop; char altunits; - waypoint* waypt; + Waypoint* waypt; double fsec; if (trk_head == NULL) { @@ -466,7 +466,7 @@ gpgga_parse(char* ibuf) hms = hms / 100; tm.tm_hour = (long) hms % 100; - waypt = new waypoint; + waypt = new Waypoint; nmea_set_waypoint_time(waypt, &tm, fsec); @@ -514,7 +514,7 @@ gprmc_parse(char* ibuf) char fix; unsigned int dmy; double speed,course; - waypoint* waypt; + Waypoint* waypt; double fsec; char* dmybuf; int i; @@ -581,13 +581,13 @@ gprmc_parse(char* ibuf) } /* This point is both a waypoint and a trackpoint. */ if (amod_waypoint) { - waypt_add(new waypoint(*curr_waypt)); + waypt_add(new Waypoint(*curr_waypt)); amod_waypoint = 0; } return; } - waypt = new waypoint; + waypt = new Waypoint; WAYPT_SET(waypt, speed, KNOTS_TO_MPS(speed)); @@ -610,7 +610,7 @@ gprmc_parse(char* ibuf) /* This point is both a waypoint and a trackpoint. */ if (amod_waypoint) { - waypt_add(new waypoint(*waypt)); + waypt_add(new Waypoint(*waypt)); amod_waypoint = 0; } } @@ -618,7 +618,7 @@ gprmc_parse(char* ibuf) static void gpwpl_parse(char* ibuf) { - waypoint* waypt; + Waypoint* waypt; double latdeg, lngdeg; char latdir, lngdir; char sname[99]; @@ -628,7 +628,7 @@ gpwpl_parse(char* ibuf) &lngdeg,&lngdir, sname); - waypt = new waypoint; + waypt = new Waypoint; if (latdir == 'S') { latdeg = -latdeg; @@ -800,7 +800,7 @@ pcmpt_parse(char* ibuf) } if (lat || lon) { - curr_waypt = new waypoint; + curr_waypt = new Waypoint; curr_waypt->longitude = pcmpt_deg(lon); curr_waypt->latitude = pcmpt_deg(lat); @@ -833,7 +833,7 @@ pcmpt_parse(char* ibuf) trk_head = route_head_alloc(); track_add_head(trk_head); QUEUE_FOR_EACH(&pcmpt_head, elem, tmp) { - waypoint* wpt = (waypoint*) dequeue(elem); + Waypoint* wpt = (Waypoint*) dequeue(elem); nmea_add_wpt(wpt, trk_head); } } @@ -848,7 +848,7 @@ nmea_fix_timestamps(route_head* track) if (tm.tm_year == 0) { queue* elem, *temp; - waypoint* prev = NULL; + Waypoint* prev = NULL; time_t delta_tm; if (optdate == NULL) { @@ -860,7 +860,7 @@ nmea_fix_timestamps(route_head* track) delta_tm = mkgmtime(&opt_tm); QUEUE_FOR_EACH(&track->waypoint_list, elem, temp) { - waypoint* wpt = (waypoint*)elem; + Waypoint* wpt = (Waypoint*)elem; wpt->creation_time += delta_tm; if ((prev != NULL) && (prev->creation_time > wpt->creation_time)) { /* go over midnight ? */ @@ -882,7 +882,7 @@ nmea_fix_timestamps(route_head* track) /* go backward through the track and complete timestamps */ for (elem = QUEUE_LAST(&track->waypoint_list); elem != &track->waypoint_list; elem=elem->prev) { - waypoint* wpt = (waypoint*)elem; + Waypoint* wpt = (Waypoint*)elem; if (wpt->wpt_flags.fmt_use != 0) { time_t dt; @@ -1162,7 +1162,7 @@ int hunt_sirf(void) return 0; } -static waypoint* +static Waypoint* nmea_rd_posn(posn_status* posn_status) { char ibuf[1024]; @@ -1204,7 +1204,7 @@ nmea_rd_posn(posn_status* posn_status) nmea_parse_one_line(ibuf); if (lt != last_read_time) { if (last_read_time) { - waypoint* w = curr_waypt; + Waypoint* w = curr_waypt; lt = last_read_time; curr_waypt = NULL; @@ -1217,7 +1217,7 @@ nmea_rd_posn(posn_status* posn_status) } static void -nmea_wayptpr(const waypoint* wpt) +nmea_wayptpr(const Waypoint* wpt) { char obuf[200]; double lat,lon; @@ -1257,7 +1257,7 @@ nmea_track_init(const route_head* rte) } void -nmea_trackpt_pr(const waypoint* wpt) +nmea_trackpt_pr(const Waypoint* wpt) { char obuf[200]; char fix='0'; @@ -1390,7 +1390,7 @@ nmea_wr_posn_init(const char* fname) } static void -nmea_wr_posn(waypoint* wpt) +nmea_wr_posn(Waypoint* wpt) { nmea_trackpt_pr(wpt); } diff --git a/gpsbabel/nmn4.cc b/gpsbabel/nmn4.cc index 0d8afc53c..cc9f4fd74 100644 --- a/gpsbabel/nmn4.cc +++ b/gpsbabel/nmn4.cc @@ -104,7 +104,7 @@ nmn4_read_data(void) QString zip1, zip2, city, street, number; route_head* route; - waypoint* wpt; + Waypoint* wpt; route = route_head_alloc(); route_add_head(route); @@ -123,7 +123,7 @@ nmn4_read_data(void) /* for a quiet compiler */ zip1 = zip2 = city = street = number = QString(); - wpt = new waypoint; + wpt = new Waypoint; column = -1; c = csv_lineparse(str, "|", "", column++); @@ -229,7 +229,7 @@ nmn4_route_tlr(const route_head* rte) } static void -nmn4_write_waypt(const waypoint* wpt) +nmn4_write_waypt(const Waypoint* wpt) { char city[128], street[128], zipc[32], number[32]; diff --git a/gpsbabel/osm.cc b/gpsbabel/osm.cc index b7c161881..5e7ff247f 100644 --- a/gpsbabel/osm.cc +++ b/gpsbabel/osm.cc @@ -36,7 +36,7 @@ static arglist_t osm_args[] = { #define MYNAME "osm" -static QHash waypoints; +static QHash waypoints; static QHash keys; static QHash values; @@ -47,7 +47,7 @@ static int node_id; static int skip_rte; static route_head* rte; -static waypoint* wpt; +static Waypoint* wpt; static xg_callback osm_node, osm_node_tag, osm_node_end; static xg_callback osm_way, osm_way_nd, osm_way_tag, osm_way_end; @@ -482,7 +482,7 @@ osm_node_end(xg_string args, const QXmlStreamAttributes* unused) static void osm_node(xg_string args, const QXmlStreamAttributes* attrv) { - wpt = new waypoint; + wpt = new Waypoint; if (attrv->hasAttribute("id")) { QString atstr = attrv->value("id").toString(); @@ -592,12 +592,12 @@ osm_way_nd(xg_string args, const QXmlStreamAttributes* attrv) { if (attrv->hasAttribute("ref")) { QString atstr = attrv->value("ref").toString(); - waypoint* tmp; - const waypoint* ctmp; + Waypoint* tmp; + const Waypoint* ctmp; if (waypoints.contains(atstr)) { ctmp = waypoints.value(atstr); - tmp = new waypoint(*ctmp); + tmp = new Waypoint(*ctmp); route_add_wpt(rte, tmp); } else { warning(MYNAME ": Way reference id \"%s\" wasn't listed under nodes!\n", CSTR(atstr)); @@ -700,7 +700,7 @@ osm_write_tag(const QString& key, const QString& value) } static void -osm_disp_feature(const waypoint* wpt) +osm_disp_feature(const Waypoint* wpt) { const osm_icon_mapping_t* map; @@ -740,17 +740,17 @@ osm_write_opt_tag(const char* atag) } static void -osm_release_ids(const waypoint* wpt) +osm_release_ids(const Waypoint* wpt) { if (wpt && wpt->extra_data) { - waypoint* tmp = (waypoint*)wpt; + Waypoint* tmp = (Waypoint*)wpt; xfree(tmp->extra_data); tmp->extra_data = NULL; } } static QString -osm_name_from_wpt(const waypoint* wpt) +osm_name_from_wpt(const Waypoint* wpt) { QString name = QString("%1\01%2\01%3") #if NEW_STRINGS @@ -764,7 +764,7 @@ osm_name_from_wpt(const waypoint* wpt) } static void -osm_waypt_disp(const waypoint* wpt) +osm_waypt_disp(const Waypoint* wpt) { QString name = osm_name_from_wpt(wpt); @@ -778,7 +778,7 @@ osm_waypt_disp(const waypoint* wpt) id = (int*) xmalloc(sizeof(*id)); *id = --node_id; - ((waypoint*)(wpt))->extra_data = id; + ((Waypoint*)(wpt))->extra_data = id; gbfprintf(fout, " latitude, wpt->longitude); if (wpt->creation_time.isValid()) { @@ -858,10 +858,10 @@ osm_rte_disp_head(const route_head* rte) } static void -osm_rtept_disp(const waypoint* wpt_ref) +osm_rtept_disp(const Waypoint* wpt_ref) { QString name = osm_name_from_wpt(wpt_ref); - const waypoint* wpt; + const Waypoint* wpt; if (skip_rte) { return; diff --git a/gpsbabel/overlay.cc b/gpsbabel/overlay.cc index 4a70116d2..55e1ba01e 100644 --- a/gpsbabel/overlay.cc +++ b/gpsbabel/overlay.cc @@ -249,7 +249,7 @@ static void ovl_read(void) int keyw,i; double rwert; route_head* route_head = NULL; - waypoint* wpt; + Waypoint* wpt; int sym_cnt; int lineno = 0; @@ -313,7 +313,7 @@ static void ovl_read(void) } break; case KEY_PUNKTE : - isSection = SECTION_PUNKTE; // Linie, Fläche + isSection = SECTION_PUNKTE; // Linie, Fl�che break; #ifdef WITH_BITMAP case KEY_PATH : @@ -362,7 +362,7 @@ static void ovl_read(void) switch (aktTyp) { #ifdef WITH_BITMAP case 1: // Bitmap - wpt = new waypoint; + wpt = new Waypoint; wpt->latitude = aktY; wpt->longitude = aktX; wpt->altitude = 0.0; @@ -374,13 +374,13 @@ static void ovl_read(void) isSection = SECTION_SYMBOL; break; case 3: // Linie - wpt = new waypoint; + wpt = new Waypoint; wpt->latitude = aktY; wpt->longitude = aktX; wpt->altitude = 0.0; route_add_wpt(route_head, wpt); break; - case 4: // Fläche + case 4: // Fl�che break; case 5: // Rechteck break; @@ -503,7 +503,7 @@ static void ovl_wr_deinit(void) gbfprintf(fpout,"CenterLat=%.8lf\n",govl_sum_n/govl_sumcnt); // precision 8 = better than 1mm gbfprintf(fpout,"CenterLong=%.8lf\n",govl_sum_e/govl_sumcnt); } else { - gbfprintf(fpout,"CenterLong=10.52374295\n"); // Braunschweiger Löwe, Mittelpunkt der Welt :-) + gbfprintf(fpout,"CenterLong=10.52374295\n"); // Braunschweiger L�we, Mittelpunkt der Welt :-) gbfprintf(fpout,"CenterLat=52.26474445\n"); } gbfprintf(fpout,"RefOn=0\n"); @@ -543,7 +543,7 @@ static void symbol_text(double east,double north,const QString& text,int group) govl_symbol_cnt++; } -static void symbol_point(const waypoint* wpt) +static void symbol_point(const Waypoint* wpt) { double east,north; @@ -565,7 +565,7 @@ static void symbol_point(const waypoint* wpt) static void symbol_deinit(const route_head* hd) { queue* elem, *tmp; - waypoint* waypointp; + Waypoint* waypointp; int i; double lat1,lon1,lat2,lon2; double lats,lons,late,lone; @@ -576,7 +576,7 @@ static void symbol_deinit(const route_head* hd) dist = 0.0; i = 0; QUEUE_FOR_EACH(&(hd->waypoint_list), elem, tmp) { - waypointp = (waypoint*) elem; + waypointp = (Waypoint*) elem; lat2 = RAD(waypointp->latitude); lon2 = RAD(waypointp->longitude); if (i) { @@ -596,7 +596,7 @@ static void symbol_deinit(const route_head* hd) i = 0; elem = QUEUE_FIRST(&(hd->waypoint_list)); while (elem!=&(hd->waypoint_list) && ddlatitude); lon2 = RAD(waypointp->longitude); if (i) { @@ -627,7 +627,7 @@ static void symbol_deinit(const route_head* hd) govl_dir = 0.0; // restore } -static void overlay_waypt_pr(const waypoint* waypointp) +static void overlay_waypt_pr(const Waypoint* waypointp) { const char* oname; diff --git a/gpsbabel/ozi.cc b/gpsbabel/ozi.cc index a95bc602a..79a7314ab 100644 --- a/gpsbabel/ozi.cc +++ b/gpsbabel/ozi.cc @@ -148,7 +148,7 @@ ozi_alloc_fsdata(void) } void -ozi_get_time_str(const waypoint* waypointp, char* buff, gbsize_t buffsz) +ozi_get_time_str(const Waypoint* waypointp, char* buff, gbsize_t buffsz) { if (waypointp->creation_time.isValid()) { double time = (waypt_time(waypointp) / SECONDS_PER_DAY) + DAYS_SINCE_1990; @@ -159,7 +159,7 @@ ozi_get_time_str(const waypoint* waypointp, char* buff, gbsize_t buffsz) } void -ozi_set_time_str(const QString& str, waypoint* waypointp) +ozi_set_time_str(const QString& str, Waypoint* waypointp) { double ozi_time = str.toDouble(); @@ -170,7 +170,7 @@ ozi_set_time_str(const QString& str, waypoint* waypointp) } static void -ozi_convert_datum(waypoint* wpt) +ozi_convert_datum(Waypoint* wpt) { if (datum != DATUM_WGS84) { double lat, lon, alt; @@ -254,7 +254,7 @@ ozi_track_hdr(const route_head* rte) } static void -ozi_track_disp(const waypoint* waypointp) +ozi_track_disp(const Waypoint* waypointp) { double alt; char ozi_time[16]; @@ -321,7 +321,7 @@ ozi_route_hdr(const route_head* rte) } static void -ozi_route_disp(const waypoint* waypointp) +ozi_route_disp(const Waypoint* waypointp) { char ozi_time[16]; @@ -487,7 +487,7 @@ wr_deinit(void) } static void -ozi_parse_waypt(int field, const QString& str, waypoint* wpt_tmp, ozi_fsdata* fsdata) +ozi_parse_waypt(int field, const QString& str, Waypoint* wpt_tmp, ozi_fsdata* fsdata) { double alt; @@ -582,7 +582,7 @@ ozi_parse_waypt(int field, const QString& str, waypoint* wpt_tmp, ozi_fsdata* fs } static void -ozi_parse_track(int field, char* str, waypoint* wpt_tmp, char* trk_name) +ozi_parse_track(int field, char* str, Waypoint* wpt_tmp, char* trk_name) { double alt; @@ -628,7 +628,7 @@ ozi_parse_track(int field, char* str, waypoint* wpt_tmp, char* trk_name) } static void -ozi_parse_routepoint(int field, char* str, waypoint* wpt_tmp) +ozi_parse_routepoint(int field, char* str, Waypoint* wpt_tmp) { if (*str == '\0') { return; @@ -688,7 +688,7 @@ ozi_parse_routepoint(int field, char* str, waypoint* wpt_tmp) } static void -ozi_parse_routeheader(int field, const QString& str, waypoint* wpt_tmp) +ozi_parse_routeheader(int field, const QString& str, Waypoint* wpt_tmp) { switch (field) { @@ -722,7 +722,7 @@ data_read(void) { QString buff; char* trk_name = NULL; - waypoint* wpt_tmp; + Waypoint* wpt_tmp; int i; int linecount = 0; @@ -779,7 +779,7 @@ data_read(void) if (buff.contains(',')) { bool ozi_fsdata_used = false; ozi_fsdata* fsdata = ozi_alloc_fsdata(); - wpt_tmp = new waypoint; + wpt_tmp = new Waypoint; /* data delimited by commas, possibly enclosed in quotes. */ char* orig_s = xstrdup(CSTR(buff)); @@ -864,7 +864,7 @@ data_read(void) } static void -ozi_waypt_pr(const waypoint* wpt) +ozi_waypt_pr(const Waypoint* wpt) { static int index = 0; double alt; diff --git a/gpsbabel/pcx.cc b/gpsbabel/pcx.cc index 5f9de4aac..9152b43cc 100644 --- a/gpsbabel/pcx.cc +++ b/gpsbabel/pcx.cc @@ -93,7 +93,7 @@ data_read(void) char date[10]; char time[9]; char month[4]; - waypoint* wpt_tmp; + Waypoint* wpt_tmp; char* buff; struct tm tm; route_head* track = NULL; @@ -153,7 +153,7 @@ data_read(void) name[sizeof(name)-1] = '\0'; desc[sizeof(desc)-1] = '\0'; - wpt_tmp = new waypoint; + wpt_tmp = new Waypoint; wpt_tmp->altitude = alt; cp = lrtrim(name); if (*cp != '\0') { @@ -184,7 +184,7 @@ data_read(void) wpt_tmp->latitude = ddmm2degrees(lat); } if (route != NULL) { - route_add_wpt(route, new waypoint(*wpt_tmp)); + route_add_wpt(route, new Waypoint(*wpt_tmp)); } waypt_add(wpt_tmp); points++; @@ -253,7 +253,7 @@ data_read(void) if (tm.tm_year < 70) { tm.tm_year += 100; } - wpt_tmp = new waypoint; + wpt_tmp = new Waypoint; wpt_tmp->SetCreationTime(mkgmtime(&tm)); if (read_as_degrees) { wpt_tmp->longitude = lon; @@ -316,7 +316,7 @@ data_read(void) } static void -gpsutil_disp(const waypoint* wpt) +gpsutil_disp(const Waypoint* wpt) { double lon,lat; int icon_token = 0; @@ -394,7 +394,7 @@ pcx_route_hdr(const route_head* rte) } void -pcx_track_disp(const waypoint* wpt) +pcx_track_disp(const Waypoint* wpt) { double lon,lat; char tbuf[100]; diff --git a/gpsbabel/pocketfms_bc.cc b/gpsbabel/pocketfms_bc.cc index aeaf9ee54..5fef6d9da 100644 --- a/gpsbabel/pocketfms_bc.cc +++ b/gpsbabel/pocketfms_bc.cc @@ -90,7 +90,7 @@ read_tracks(void) while (1 == gbfread(&bc, sizeof(bc), 1, file_in)) { struct tm tm; - waypoint* wpt; + Waypoint* wpt; if (strcmp(bc.id, header_id) != 0) { fatal(MYNAME ": invalid breadcrumb header in input file.\n"); @@ -104,7 +104,7 @@ read_tracks(void) tm.tm_min = le_readu16(&bc.minute); tm.tm_sec = le_readu16(&bc.second); - wpt = new waypoint; + wpt = new Waypoint; wpt->latitude = le_read_float(&bc.latitude); wpt->longitude = le_read_float(&bc.longitude); wpt->altitude = FEET_TO_METERS(le_read_float(&bc.altitude)); @@ -126,7 +126,7 @@ route_head_noop(const route_head* wp) } static void -pocketfms_waypt_disp(const waypoint* wpt) +pocketfms_waypt_disp(const Waypoint* wpt) { struct breadcrumb bc; struct tm* tm; diff --git a/gpsbabel/pocketfms_fp.cc b/gpsbabel/pocketfms_fp.cc index f5eff59b5..aa1c6a2e7 100644 --- a/gpsbabel/pocketfms_fp.cc +++ b/gpsbabel/pocketfms_fp.cc @@ -26,7 +26,7 @@ static int isFirst = 1; static route_head* route = NULL; -static waypoint* wpt_to, *wpt_from; +static Waypoint* wpt_to, *wpt_from; static double dest_altitude; #define MYNAME "PocketFMS FlightPlan" @@ -65,8 +65,8 @@ static void rd_deinit(void) { if (route != NULL) { - waypoint* head = (waypoint*) QUEUE_FIRST(&route->waypoint_list); - waypoint* tail = (waypoint*) QUEUE_LAST(&route->waypoint_list); + Waypoint* head = (Waypoint*) QUEUE_FIRST(&route->waypoint_list); + Waypoint* tail = (Waypoint*) QUEUE_LAST(&route->waypoint_list); if (head != NULL) { route->rte_name = head->shortname; } @@ -88,12 +88,12 @@ wr_init(const char* fname) void wpt_s(xg_string args, const QXmlStreamAttributes* unused) { if (isFirst == 1) { - wpt_from = new waypoint; + wpt_from = new Waypoint; route = route_head_alloc(); route->rte_desc="PocketFMS flightplan"; route_add_head(route); } - wpt_to = new waypoint; + wpt_to = new Waypoint; } void wpt_e(xg_string args, const QXmlStreamAttributes* unused) @@ -101,14 +101,14 @@ void wpt_e(xg_string args, const QXmlStreamAttributes* unused) if (isFirst == 1) { route_add_wpt(route, wpt_from); if (doing_wpts) { - waypt_add(new waypoint(*wpt_from)); + waypt_add(new Waypoint(*wpt_from)); } wpt_from = NULL; isFirst = 0; } route_add_wpt(route, wpt_to); if (doing_wpts) { - waypt_add(new waypoint(*wpt_to)); + waypt_add(new Waypoint(*wpt_to)); } wpt_to = NULL; } diff --git a/gpsbabel/pocketfms_wp.cc b/gpsbabel/pocketfms_wp.cc index 656fe6ee6..fc60a27f0 100644 --- a/gpsbabel/pocketfms_wp.cc +++ b/gpsbabel/pocketfms_wp.cc @@ -59,13 +59,13 @@ data_read(void) int linecount = 0; while ((buff = gbfgetstr(file_in))) { char* s; - waypoint* wpt; + Waypoint* wpt; rtrim(buff); if (strlen(buff) == 0) { break; } linecount++; - wpt = new waypoint; + wpt = new Waypoint; s = buff; s = csv_lineparse(s, "\\w", "", linecount); if (!s) { @@ -100,7 +100,7 @@ wr_init(const char* fname) } static void -enigma_waypt_disp(const waypoint* wpt) +enigma_waypt_disp(const Waypoint* wpt) { char* t; #if NEW_STRINGS diff --git a/gpsbabel/polygon.cc b/gpsbabel/polygon.cc index c926ad14c..980d65df8 100644 --- a/gpsbabel/polygon.cc +++ b/gpsbabel/polygon.cc @@ -236,7 +236,7 @@ void polygon_process(void) { queue* elem, * tmp; - waypoint* waypointp; + Waypoint* waypointp; extra_data* ed; double lat1, lon1, lat2, lon2; double olat, olon; @@ -270,10 +270,10 @@ polygon_process(void) } else if (lat1 != BADVAL && lon1 != BADVAL && lat2 != BADVAL && lon2 != BADVAL) { #if NEWQ - foreach(waypoint* waypointp, waypt_list) { + foreach(Waypoint* waypointp, waypt_list) { #else QUEUE_FOR_EACH(&waypt_head, elem, tmp) { - waypointp = (waypoint*)elem; + waypointp = (Waypoint*)elem; #endif if (waypointp->extra_data) { ed = (extra_data*) waypointp->extra_data; @@ -319,10 +319,10 @@ polygon_process(void) gbfclose(file_in); #if NEWQ - foreach(waypoint* wp, waypt_list) { + foreach(Waypoint* wp, waypt_list) { #else QUEUE_FOR_EACH(&waypt_head, elem, tmp) { - waypoint* wp = (waypoint*) elem; + Waypoint* wp = (Waypoint*) elem; #endif ed = (extra_data*) wp->extra_data; wp->extra_data = NULL; diff --git a/gpsbabel/position.cc b/gpsbabel/position.cc index 28abf77f2..db32f519b 100644 --- a/gpsbabel/position.cc +++ b/gpsbabel/position.cc @@ -77,16 +77,16 @@ static void position_runqueue(queue* q, int nelems, int qtype) { queue* elem, * tmp; - waypoint** comp; + Waypoint** comp; int* qlist; double dist, diff_time; int i = 0, j, anyitem; - comp = (waypoint**) xcalloc(nelems, sizeof(*comp)); + comp = (Waypoint**) xcalloc(nelems, sizeof(*comp)); qlist = (int*) xcalloc(nelems, sizeof(*qlist)); QUEUE_FOR_EACH(q, elem, tmp) { - comp[i] = (waypoint*)elem; + comp[i] = (Waypoint*)elem; qlist[i] = 0; i++; } @@ -173,7 +173,7 @@ position_process_route(const route_head* rh) } static void -position_noop_w(const waypoint* w) +position_noop_w(const Waypoint* w) { } diff --git a/gpsbabel/psitrex.cc b/gpsbabel/psitrex.cc index ce52ffdcd..aa56215ff 100644 --- a/gpsbabel/psitrex.cc +++ b/gpsbabel/psitrex.cc @@ -294,14 +294,14 @@ psit_isKnownToken(char* buf) * MRCB */ static void -psit_waypoint_r(gbfile* psit_file, waypoint** wpt) +psit_waypoint_r(gbfile* psit_file, Waypoint** wpt) { int garmin_icon_num; - waypoint* thisWaypoint; + Waypoint* thisWaypoint; if (strlen(psit_current_token) > 0) { - thisWaypoint = new waypoint; + thisWaypoint = new Waypoint; thisWaypoint->latitude = atof(psit_current_token); @@ -339,7 +339,7 @@ psit_waypoint_r(gbfile* psit_file, waypoint** wpt) * MRCB */ static void -psit_waypoint_w(gbfile* psit_file, const waypoint* wpt) +psit_waypoint_w(gbfile* psit_file, const Waypoint* wpt) { int icon; const char* ident; @@ -378,7 +378,7 @@ psit_waypoint_w(gbfile* psit_file, const waypoint* wpt) } static void -psit_waypoint_w_wrapper(const waypoint* wpt) +psit_waypoint_w_wrapper(const Waypoint* wpt) { psit_waypoint_w(psit_file_out, wpt); } @@ -398,7 +398,7 @@ psit_route_r(gbfile* psit_file, route_head** rte) route_head* rte_head; unsigned int rte_count; - waypoint* thisWaypoint; + Waypoint* thisWaypoint; psit_getToken(psit_file,psit_current_token,sizeof(psit_current_token), ltrimEOL); @@ -423,7 +423,7 @@ psit_route_r(gbfile* psit_file, route_head** rte) while (psit_isKnownToken(psit_current_token) != 0) { if (strlen(psit_current_token) > 0) { - thisWaypoint = new waypoint; + thisWaypoint = new Waypoint; thisWaypoint->latitude = atof(psit_current_token); @@ -474,7 +474,7 @@ psit_routehdr_w(gbfile* psit_file, const route_head* rte) unsigned int rte_datapoints; char* rname; - waypoint* testwpt; + Waypoint* testwpt; time_t uniqueValue = 0; int allWptNameLengths; @@ -488,7 +488,7 @@ psit_routehdr_w(gbfile* psit_file, const route_head* rte) char* c; QUEUE_FOR_EACH(&rte->waypoint_list, elem, tmp) { - testwpt = (waypoint*)elem; + testwpt = (Waypoint*)elem; if (rte_datapoints == 0) { uniqueValue = testwpt->GetCreationTime().toTime_t(); } @@ -547,7 +547,7 @@ psit_track_r(gbfile* psit_file, route_head** trk) route_head* track_head = NULL; unsigned int trk_count; - waypoint* thisWaypoint; + Waypoint* thisWaypoint; psit_getToken(psit_file,psit_current_token,sizeof(psit_current_token), ltrimEOL); if (strlen(psit_current_token) == 0) { @@ -568,7 +568,7 @@ psit_track_r(gbfile* psit_file, route_head** trk) while (psit_isKnownToken(psit_current_token) != 0) { if (strlen(psit_current_token) > 0) { - thisWaypoint = new waypoint; + thisWaypoint = new Waypoint; thisWaypoint->latitude = atof(psit_current_token); @@ -643,7 +643,7 @@ psit_trackhdr_w(gbfile* psit_file, const route_head* trk) char hdr[30]; unsigned int trk_datapoints; char* tname; - waypoint* testwpt; + Waypoint* testwpt; time_t uniqueValue = 0; queue* elem, *tmp; @@ -656,7 +656,7 @@ psit_trackhdr_w(gbfile* psit_file, const route_head* trk) QUEUE_FOR_EACH(&trk->waypoint_list, elem, tmp) { if (trk_datapoints == 0) { - testwpt = (waypoint*)elem; + testwpt = (Waypoint*)elem; uniqueValue = testwpt->GetCreationTime().toTime_t(); } trk_datapoints++; @@ -703,7 +703,7 @@ psit_trackhdr_w_wrapper(const route_head* trk) * MRCB */ static void -psit_trackdatapoint_w(gbfile* psit_file, const waypoint* wpt) +psit_trackdatapoint_w(gbfile* psit_file, const Waypoint* wpt) { time_t t = wpt->GetCreationTime().toTime_t(); struct tm* tmTime = gmtime(&t); @@ -732,7 +732,7 @@ psit_trackdatapoint_w(gbfile* psit_file, const waypoint* wpt) } static void -psit_trackdatapoint_w_wrapper(const waypoint* wpt) +psit_trackdatapoint_w_wrapper(const Waypoint* wpt) { psit_trackdatapoint_w(psit_file_out, wpt); } @@ -741,7 +741,7 @@ psit_trackdatapoint_w_wrapper(const waypoint* wpt) static void psit_read(void) { - waypoint* wpt; + Waypoint* wpt; route_head* rte; route_head* trk; diff --git a/gpsbabel/radius.cc b/gpsbabel/radius.cc index 34b5c9446..840148d46 100644 --- a/gpsbabel/radius.cc +++ b/gpsbabel/radius.cc @@ -38,7 +38,7 @@ static char* maxctarg = NULL; static char* routename = NULL; static int maxct; -static waypoint* home_pos; +static Waypoint* home_pos; typedef struct { double distance; @@ -91,8 +91,8 @@ gc_distance(double lat1, double lon1, double lat2, double lon2) static int dist_comp(const void* a, const void* b) { - const waypoint* x1 = *(waypoint**)a; - const waypoint* x2 = *(waypoint**)b; + const Waypoint* x1 = *(Waypoint**)a; + const Waypoint* x2 = *(Waypoint**)b; extra_data* x1e = (extra_data*) x1->extra_data; extra_data* x2e = (extra_data*) x2->extra_data; @@ -110,17 +110,17 @@ void radius_process(void) { queue* elem, * tmp; - waypoint* waypointp; + Waypoint* waypointp; double dist; - waypoint** comp; + Waypoint** comp; int i, wc; queue temp_head; route_head* rte_head = NULL; #if NEWQ - foreach(waypoint* waypointp, waypt_list) { + foreach(Waypoint* waypointp, waypt_list) { #else QUEUE_FOR_EACH(&waypt_head, elem, tmp) { - waypointp = (waypoint*)elem; + waypointp = (Waypoint*)elem; #endif dist = gc_distance(waypointp->latitude, waypointp->longitude, @@ -144,7 +144,7 @@ radius_process(void) wc = waypt_count(); QUEUE_INIT(&temp_head); - comp = (waypoint**) xcalloc(wc, sizeof(*comp)); + comp = (Waypoint**) xcalloc(wc, sizeof(*comp)); i = 0; @@ -155,14 +155,14 @@ radius_process(void) */ QUEUE_FOR_EACH(&waypt_head, elem, tmp) { - waypoint* wp = (waypoint*) elem; + Waypoint* wp = (Waypoint*) elem; comp[i] = wp; waypt_del(wp); i++; } if (!nosort) { - qsort(comp, wc, sizeof(waypoint*), dist_comp); + qsort(comp, wc, sizeof(Waypoint*), dist_comp); } if (routename) { @@ -177,7 +177,7 @@ radius_process(void) * on through in the modified order. */ for (i = 0; i < wc; i++) { - waypoint* wp = comp[i]; + Waypoint* wp = comp[i]; xfree(wp->extra_data); wp->extra_data = NULL; @@ -217,7 +217,7 @@ radius_init(const char* args) maxct = 0; } - home_pos = (waypoint*) xcalloc(sizeof(*home_pos), 1); + home_pos = (Waypoint*) xcalloc(sizeof(*home_pos), 1); if (latopt) { home_pos->latitude = atof(latopt); diff --git a/gpsbabel/random.cc b/gpsbabel/random.cc index 9c1ef3c01..c17962be6 100644 --- a/gpsbabel/random.cc +++ b/gpsbabel/random.cc @@ -112,7 +112,7 @@ random_read(void) int i, points; route_head* head; - waypoint* prev = NULL; + Waypoint* prev = NULL; time_t time = gpsbabel_time; if (opt_seed) { @@ -142,10 +142,10 @@ random_read(void) for (i = 0; i < points; i++) { - waypoint* wpt; + Waypoint* wpt; garmin_fs_t* gmsd; - wpt = new waypoint; + wpt = new Waypoint; gmsd = garmin_fs_alloc(-1); fs_chain_add(&wpt->fs, (format_specific_data*) gmsd); diff --git a/gpsbabel/raymarine.cc b/gpsbabel/raymarine.cc index 16b212535..f8e875b14 100644 --- a/gpsbabel/raymarine.cc +++ b/gpsbabel/raymarine.cc @@ -55,7 +55,7 @@ typedef unsigned long long guid_t; static inifile_t* fin; static gbfile* fout; -static waypoint** waypt_table; +static Waypoint** waypt_table; static short_handle hshort_wpt, hshort_rte; static int waypt_table_sz, waypt_table_ct; static int rte_index, rte_wpt_index; @@ -183,7 +183,7 @@ raymarine_rd_done(void) static void raymarine_read(void) { - waypoint* wpt; + Waypoint* wpt; unsigned int ix; unsigned int rx; @@ -207,7 +207,7 @@ raymarine_read(void) break; } - wpt = new waypoint; + wpt = new Waypoint; wpt->shortname = name; wpt->latitude = atof(lat); wpt->longitude = atof(lon); @@ -250,7 +250,7 @@ raymarine_read(void) for (wx = 0; wx < 0x3FFF; wx++) { char buff[32]; char* str; - waypoint* wpt; + Waypoint* wpt; snprintf(buff, sizeof(buff), "Mk%d", wx); str = inifile_readstr(fin, sect, buff); @@ -263,7 +263,7 @@ raymarine_read(void) fatal(MYNAME ": No associated waypoint for route point %s (Route %s)!\n", str, CSTRc(rte->rte_name)); - route_add_wpt(rte, new waypoint(*wpt)); + route_add_wpt(rte, new Waypoint(*wpt)); } } } @@ -275,7 +275,7 @@ raymarine_read(void) /* make waypoint shortnames unique */ static char -same_points(const waypoint* A, const waypoint* B) +same_points(const Waypoint* A, const Waypoint* B) { return ( /* !!! We are case-sensitive !!! */ #if NEW_STRINGS @@ -288,13 +288,13 @@ same_points(const waypoint* A, const waypoint* B) } static void -register_waypt(const waypoint* ref, const char is_rtept) +register_waypt(const Waypoint* ref, const char is_rtept) { int i; - waypoint* wpt = (waypoint*) ref; + Waypoint* wpt = (Waypoint*) ref; for (i = 0; i < waypt_table_ct; i++) { - waypoint* cmp = waypt_table[i]; + Waypoint* cmp = waypt_table[i]; if (same_points(wpt, cmp)) { wpt->extra_data = cmp->extra_data; @@ -305,35 +305,35 @@ register_waypt(const waypoint* ref, const char is_rtept) if (waypt_table_ct >= waypt_table_sz) { waypt_table_sz += 32; if (waypt_table) { - waypt_table = (waypoint**) xrealloc(waypt_table, waypt_table_sz * sizeof(wpt)); + waypt_table = (Waypoint**) xrealloc(waypt_table, waypt_table_sz * sizeof(wpt)); } else { - waypt_table = (waypoint**) xmalloc(waypt_table_sz * sizeof(wpt)); + waypt_table = (Waypoint**) xmalloc(waypt_table_sz * sizeof(wpt)); } } wpt->extra_data = (void*)mkshort(hshort_wpt, CSTRc(wpt->shortname)); - waypt_table[waypt_table_ct] = (waypoint*)wpt; + waypt_table[waypt_table_ct] = (Waypoint*)wpt; waypt_table_ct++; } static void -enum_waypt_cb(const waypoint* wpt) +enum_waypt_cb(const Waypoint* wpt) { - register_waypt((waypoint*) wpt, 0); + register_waypt((Waypoint*) wpt, 0); } static void -enum_rtept_cb(const waypoint* wpt) +enum_rtept_cb(const Waypoint* wpt) { - register_waypt((waypoint*) wpt, 1); + register_waypt((Waypoint*) wpt, 1); } static int qsort_cb(const void* a, const void* b) { - const waypoint* wa = *(waypoint**)a; - const waypoint* wb = *(waypoint**)b; + const Waypoint* wa = *(Waypoint**)a; + const Waypoint* wb = *(Waypoint**)b; #if NEW_STRINGS return wa->shortname.compare(wb->shortname); #else @@ -342,7 +342,7 @@ qsort_cb(const void* a, const void* b) } static void -write_waypoint(gbfile* fout, const waypoint* wpt, const int waypt_no, const char* location) +write_waypoint(gbfile* fout, const Waypoint* wpt, const int waypt_no, const char* location) { QString notes; char* name; @@ -410,7 +410,7 @@ write_route_head_cb(const route_head* rte) } static void -write_route_wpt_cb(const waypoint* wpt) +write_route_wpt_cb(const Waypoint* wpt) { static const char* items[] = { "Cog", @@ -480,7 +480,7 @@ static void raymarine_write(void) { int i; - waypoint* wpt; + Waypoint* wpt; waypt_table_sz = 0; waypt_table_ct = 0; @@ -498,7 +498,7 @@ raymarine_write(void) /* write out waypoint summary */ for (i = 0; i < waypt_table_ct; i++) { - waypoint* wpt = waypt_table[i]; + Waypoint* wpt = waypt_table[i]; write_waypoint(fout, wpt, i, opt_location); } diff --git a/gpsbabel/reverse_route.cc b/gpsbabel/reverse_route.cc index be466cd38..486373463 100644 --- a/gpsbabel/reverse_route.cc +++ b/gpsbabel/reverse_route.cc @@ -35,11 +35,11 @@ arglist_t reverse_route_args[] = { /* * reverse_route_wpt fixes up the waypoint flag new_trkseg */ -static void reverse_route_wpt(const waypoint* waypointp) +static void reverse_route_wpt(const Waypoint* waypointp) { /* Cast away const-ness */ - waypoint* wpp = (waypoint*) waypointp; + Waypoint* wpp = (Waypoint*) waypointp; int curr_new_trkseg; diff --git a/gpsbabel/route.cc b/gpsbabel/route.cc index ac2eba0d4..ab7f75401 100644 --- a/gpsbabel/route.cc +++ b/gpsbabel/route.cc @@ -29,7 +29,7 @@ static int rte_waypts; static int trk_head_ct; static int trk_waypts; -extern void update_common_traits(const waypoint* wpt); +extern void update_common_traits(const Waypoint* wpt); void route_init(void) @@ -166,7 +166,7 @@ route_find_track_by_name(const char* name) } static void -any_route_add_wpt(route_head* rte, waypoint* wpt, int* ct, int synth, const QString& namepart, int number_digits) +any_route_add_wpt(route_head* rte, Waypoint* wpt, int* ct, int synth, const QString& namepart, int number_digits) { ENQUEUE_TAIL(&rte->waypoint_list, &wpt->Q); rte->rte_waypt_ct++; /* waypoints in this route */ @@ -181,7 +181,7 @@ any_route_add_wpt(route_head* rte, waypoint* wpt, int* ct, int synth, const QStr } void -route_add_wpt_named(route_head* rte, waypoint* wpt, const QString& namepart, int number_digits) +route_add_wpt_named(route_head* rte, Waypoint* wpt, const QString& namepart, int number_digits) { // First point in a route is always a new segment. // This improves compatibility when reading from @@ -194,14 +194,14 @@ route_add_wpt_named(route_head* rte, waypoint* wpt, const QString& namepart, int } void -route_add_wpt(route_head* rte, waypoint* wpt) +route_add_wpt(route_head* rte, Waypoint* wpt) { const char RPT[] = "RPT"; route_add_wpt_named(rte, wpt, RPT, 3); } void -track_add_wpt_named(route_head* rte, waypoint* wpt, const QString& namepart, int number_digits) +track_add_wpt_named(route_head* rte, Waypoint* wpt, const QString& namepart, int number_digits) { // First point in a track is always a new segment. // This improves compatibility when reading from @@ -214,19 +214,19 @@ track_add_wpt_named(route_head* rte, waypoint* wpt, const QString& namepart, int } void -track_add_wpt(route_head* rte, waypoint* wpt) +track_add_wpt(route_head* rte, Waypoint* wpt) { const char RPT[] = "RPT"; track_add_wpt_named(rte, wpt, RPT, 3); } -waypoint* +Waypoint* route_find_waypt_by_name(route_head* rh, const char* name) { queue* elem, *tmp; QUEUE_FOR_EACH(&rh->waypoint_list, elem, tmp) { - waypoint* waypointp = (waypoint*) elem; + Waypoint* waypointp = (Waypoint*) elem; if (waypointp->shortname == name) { return waypointp; } @@ -235,10 +235,10 @@ route_find_waypt_by_name(route_head* rh, const char* name) } static void -any_route_del_wpt(route_head* rte, waypoint* wpt, int* ct) +any_route_del_wpt(route_head* rte, Waypoint* wpt, int* ct) { - if (wpt->wpt_flags.new_trkseg && wpt != (waypoint*)QUEUE_LAST(&rte->waypoint_list)) { - waypoint* wpt_next = (waypoint*)QUEUE_NEXT(&wpt->Q); + if (wpt->wpt_flags.new_trkseg && wpt != (Waypoint*)QUEUE_LAST(&rte->waypoint_list)) { + Waypoint* wpt_next = (Waypoint*)QUEUE_NEXT(&wpt->Q); wpt_next->wpt_flags.new_trkseg = 1; } wpt->wpt_flags.new_trkseg = 0; @@ -250,13 +250,13 @@ any_route_del_wpt(route_head* rte, waypoint* wpt, int* ct) } void -route_del_wpt(route_head* rte, waypoint* wpt) +route_del_wpt(route_head* rte, Waypoint* wpt) { any_route_del_wpt(rte, wpt, &rte_waypts); } void -track_del_wpt(route_head* rte, waypoint* wpt) +track_del_wpt(route_head* rte, Waypoint* wpt) { any_route_del_wpt(rte, wpt, &trk_waypts); } @@ -269,8 +269,8 @@ route_disp(const route_head* rh, waypt_cb cb) return; } QUEUE_FOR_EACH(&rh->waypoint_list, elem, tmp) { - waypoint* waypointp; - waypointp = (waypoint*) elem; + Waypoint* waypointp; + waypointp = (Waypoint*) elem; (*cb)(waypointp); } @@ -422,7 +422,7 @@ route_copy(int* dst_count, int* dst_wpt_count, queue** dst, queue* src) rte_new->rte_num = rte_old->rte_num; any_route_add_head(rte_new, *dst); QUEUE_FOR_EACH(&rte_old->waypoint_list, elem2, tmp2) { - any_route_add_wpt(rte_new, new waypoint(*(waypoint*)elem2), dst_wpt_count, 0, RPT, 3); + any_route_add_wpt(rte_new, new Waypoint(*(Waypoint*)elem2), dst_wpt_count, 0, RPT, 3); } (*dst_count)++; } @@ -469,14 +469,14 @@ route_restore_tlr(const route_head* rte) } static void -route_restore_wpt(const waypoint* wpt) +route_restore_wpt(const Waypoint* wpt) { (void)wpt; rte_waypts++; } static void -track_restore_wpt(const waypoint* wpt) +track_restore_wpt(const Waypoint* wpt) { (void)wpt; trk_waypts++; @@ -569,9 +569,9 @@ tracks_to_routes(void) */ void track_recompute(const route_head* trk, computed_trkdata** trkdatap) { - waypoint first; - waypoint* thisw; - waypoint* prev = &first; + Waypoint first; + Waypoint* thisw; + Waypoint* prev = &first; queue* elem, *tmp; int tkpt = 0; int pts_hrt = 0; @@ -594,7 +594,7 @@ void track_recompute(const route_head* trk, computed_trkdata** trkdatap) QUEUE_FOR_EACH((queue*)&trk->waypoint_list, elem, tmp) { double tlat, tlon, plat, plon, dist; - thisw = (waypoint*)elem; + thisw = (Waypoint*)elem; /* * gcdist and heading want radians, not degrees. diff --git a/gpsbabel/saroute.cc b/gpsbabel/saroute.cc index 868689d1a..e01ce7109 100644 --- a/gpsbabel/saroute.cc +++ b/gpsbabel/saroute.cc @@ -132,7 +132,7 @@ my_read(void) uint16_t coordcount; route_head* track_head = NULL; route_head* old_track_head = NULL; - waypoint* wpt_tmp; + Waypoint* wpt_tmp; char* routename = NULL; double seglen = 0.0; int32_t starttime = 0; @@ -205,7 +205,7 @@ my_read(void) lon = (0x80000000UL - le_read32(&latlon->lat)) / (double)(0x800000); - wpt_tmp = new waypoint; + wpt_tmp = new Waypoint; wpt_tmp->latitude = lat; wpt_tmp->longitude = -lon; if (control) { @@ -363,7 +363,7 @@ my_read(void) double lat; double lon; - wpt_tmp = new waypoint; + wpt_tmp = new Waypoint; lat = (0x80000000UL - le_read32(&latlon->lat)) / @@ -425,10 +425,10 @@ my_read(void) if (old_track_head) { if (timesynth) { track_add_wpt(old_track_head, - new waypoint(*wpt_tmp)); + new Waypoint(*wpt_tmp)); } else { route_add_wpt(old_track_head, - new waypoint(*wpt_tmp)); + new Waypoint(*wpt_tmp)); } old_track_head = NULL; } diff --git a/gpsbabel/sbn.cc b/gpsbabel/sbn.cc index df51d28b2..06979184c 100644 --- a/gpsbabel/sbn.cc +++ b/gpsbabel/sbn.cc @@ -213,7 +213,7 @@ decode_sbn_mode(const unsigned char* mode) } static void -decode_sbn_datetime(const unsigned char* buffer, waypoint* waypt) +decode_sbn_datetime(const unsigned char* buffer, Waypoint* waypt) { struct tm tm; int ms = be_readu16(buffer + 6); @@ -229,18 +229,18 @@ decode_sbn_datetime(const unsigned char* buffer, waypoint* waypt) } static void -decode_sbn_position(const unsigned char* buffer, waypoint* waypt) +decode_sbn_position(const unsigned char* buffer, Waypoint* waypt) { waypt->latitude = be_read32(buffer + 0) * 0.0000001; waypt->longitude = be_read32(buffer + 4) * 0.0000001; waypt->altitude = be_read32(buffer + 12) * 0.01; } -static waypoint* +static Waypoint* decode_sbn_record(unsigned char* buffer) { - waypoint* waypt = NULL; - waypt = new waypoint; + Waypoint* waypt = NULL; + waypt = new Waypoint; if (is_sbn_valid(buffer)) { waypt->fix = decode_sbn_mode(buffer + 3); diff --git a/gpsbabel/sbp.cc b/gpsbabel/sbp.cc index afb64c596..abe7f8ead 100644 --- a/gpsbabel/sbp.cc +++ b/gpsbabel/sbp.cc @@ -83,7 +83,7 @@ read_sbp_header(route_head* track) } } -static waypoint* +static Waypoint* read_logpoint(void) { unsigned char buffer[SBP_RECORD_LEN]; @@ -99,7 +99,7 @@ static void sbp_read(void) { if (global_opts.masked_objective & TRKDATAMASK) { - waypoint* logpoint; + Waypoint* logpoint; route_head* track; track = route_head_alloc(); diff --git a/gpsbabel/shape.cc b/gpsbabel/shape.cc index 87ea24ac8..9c7eba7a3 100644 --- a/gpsbabel/shape.cc +++ b/gpsbabel/shape.cc @@ -118,7 +118,7 @@ my_read(void) while (npts) { SHPObject* shp; - waypoint* wpt; + Waypoint* wpt; const char* name = ""; const char* url; char* tmpName = NULL; @@ -172,7 +172,7 @@ my_read(void) routehead->rte_name = name; route_add_head(routehead); for (j = 0; j < shp->nVertices; j++) { - wpt = new waypoint; + wpt = new Waypoint; wpt->latitude = shp->padfY[j]; wpt->longitude = shp->padfX[j]; wpt->altitude = shp->padfZ[j]; @@ -182,7 +182,7 @@ my_read(void) break; case SHPT_POINT: - wpt = new waypoint; + wpt = new Waypoint; wpt->latitude = shp->dfYMin; wpt->longitude = shp->dfXMin; wpt->shortname = name; @@ -262,7 +262,7 @@ my_wr_deinit(void) } void -my_write_wpt(const waypoint* wpt) +my_write_wpt(const Waypoint* wpt) { SHPObject* shpobject; @@ -285,7 +285,7 @@ poly_init(const route_head* h) void -poly_point(const waypoint* wpt) +poly_point(const Waypoint* wpt) { polybufx[poly_count] = wpt->longitude; polybufy[poly_count] = wpt->latitude; diff --git a/gpsbabel/skyforce.cc b/gpsbabel/skyforce.cc index 2485dbc61..954bc1d19 100644 --- a/gpsbabel/skyforce.cc +++ b/gpsbabel/skyforce.cc @@ -38,19 +38,19 @@ arglist_t skyforce_args[] = { static gbfile* fin, *fout; static int rte_num, wpt_num; static short_handle short_h; -static const waypoint* prev_wpt; +static const Waypoint* prev_wpt; -static waypoint* +static Waypoint* skyforce_parse_coords(const char* str) { - waypoint* wpt; + Waypoint* wpt; if (strlen(str) < 38) { fatal(MYNAME ": Incomplete line!\n"); } - wpt = new waypoint; + wpt = new Waypoint; wpt->latitude = atof(str + 21); if (str[20] == 'S') { @@ -68,10 +68,10 @@ skyforce_parse_coords(const char* str) } -static waypoint* +static Waypoint* skyforce_parse_wpt(const char* str, int* rte_num) { - waypoint* wpt; + Waypoint* wpt; wpt = skyforce_parse_coords(str); if (wpt == NULL) { @@ -91,13 +91,13 @@ skyforce_parse_wpt(const char* str, int* rte_num) } -static waypoint* +static Waypoint* skyforce_parse_trk(const char* str) { char buf[15]; int len; - waypoint* wpt; + Waypoint* wpt; wpt = skyforce_parse_coords(str); if (wpt == NULL) { @@ -148,7 +148,7 @@ skyforce_head_disp_cb(const route_head* head) static void -skyforce_waypt_disp_cb(const waypoint* wpt) +skyforce_waypt_disp_cb(const Waypoint* wpt) { char buf[75]; /* long enough for all data types */ double lat, lon; @@ -261,7 +261,7 @@ skyforce_read(void) while ((str = gbfgetstr(fin))) { - waypoint* wpt; + Waypoint* wpt; int i; str = lrtrim(str); diff --git a/gpsbabel/skytraq.cc b/gpsbabel/skytraq.cc index dfdc6bff0..6f0445a93 100644 --- a/gpsbabel/skytraq.cc +++ b/gpsbabel/skytraq.cc @@ -658,10 +658,10 @@ state_init(struct read_state* pst) pst->z = 0; } -static waypoint* +static Waypoint* make_trackpoint(struct read_state* st, double lat, double lon, double alt) { - waypoint* wpt = new waypoint; + Waypoint* wpt = new Waypoint; xasprintf(&wpt->shortname, "TP%04d", ++st->tpn); @@ -743,7 +743,7 @@ process_data_item(struct read_state* pst, const item_frame* pitem, int len) full_item f; compact_item c; multi_hz_item m; - waypoint* tpt = NULL; + Waypoint* tpt = NULL; switch (ITEM_TYPE(pitem)) { @@ -858,7 +858,7 @@ process_data_item(struct read_state* pst, const item_frame* pitem, int len) WAYPT_SET(tpt, speed, KPH_TO_MPS(ITEM_SPEED(pitem))); /* convert speed to m/s */ if (poi) { - waypt_add(new waypoint(*tpt)); + waypt_add(new Waypoint(*tpt)); } if (0 == pst->route_head_) { @@ -1508,7 +1508,7 @@ static void miniHomer_get_poi() unsigned int poi; double lat, lng, alt; double ecef_x, ecef_y, ecef_z; - waypoint* wpt; + Waypoint* wpt; for (poi=0; poi>8)&0xff; @@ -1527,7 +1527,7 @@ static void miniHomer_get_poi() } else { ECEF_to_LLA(ecef_x, ecef_y, ecef_z, &lat, &lng, &alt); - wpt = new waypoint; + wpt = new Waypoint; xasprintf(&wpt->shortname, "POI_%s", poinames[poi]); xasprintf(&wpt->description, "miniHomer points to this coordinates if the %s symbol is on", poinames[poi]); wpt->latitude = lat; diff --git a/gpsbabel/smplrout.cc b/gpsbabel/smplrout.cc index 520059fd6..e5f0e0143 100644 --- a/gpsbabel/smplrout.cc +++ b/gpsbabel/smplrout.cc @@ -73,7 +73,7 @@ static char* erroropt; static char* xteopt; static char* lenopt; static char* relopt; -void (*waypt_del_fnp)(route_head* rte, waypoint* wpt); +void (*waypt_del_fnp)(route_head* rte, Waypoint* wpt); static arglist_t routesimple_args[] = { @@ -112,7 +112,7 @@ struct xte_intermed { struct xte* xte_rec; struct xte_intermed* next; struct xte_intermed* prev; - const waypoint* wpt; + const Waypoint* wpt; }; void @@ -129,7 +129,7 @@ static const route_head* cur_rte = NULL; static struct xte* xte_recs = NULL; void -routesimple_waypt_pr(const waypoint* wpt) +routesimple_waypt_pr(const Waypoint* wpt) { if (!cur_rte) { return; @@ -150,9 +150,9 @@ routesimple_waypt_pr(const waypoint* wpt) void compute_xte(struct xte* xte_rec) { - const waypoint* wpt3 = xte_rec->intermed->wpt; - const waypoint* wpt1 = NULL; - const waypoint* wpt2 = NULL; + const Waypoint* wpt3 = xte_rec->intermed->wpt; + const Waypoint* wpt1 = NULL; + const Waypoint* wpt2 = NULL; double frac, reslat, reslon; /* if no previous, this is an endpoint and must be preserved. */ if (!xte_rec->intermed->prev) { @@ -336,8 +336,8 @@ routesimple_tail(const route_head* rte) } } (*waypt_del_fnp)((route_head*)(void*)rte, - (waypoint*)(void*)(xte_recs[i].intermed->wpt)); - delete (waypoint*)(void*)(xte_recs[i].intermed->wpt); + (Waypoint*)(void*)(xte_recs[i].intermed->wpt)); + delete (Waypoint*)(void*)(xte_recs[i].intermed->wpt); if (xte_recs[i].intermed->prev) { xte_recs[i].intermed->prev->next = xte_recs[i].intermed->next; diff --git a/gpsbabel/sort.cc b/gpsbabel/sort.cc index 1f523f539..4d98e5b4d 100644 --- a/gpsbabel/sort.cc +++ b/gpsbabel/sort.cc @@ -59,8 +59,8 @@ arglist_t sort_args[] = { static int sort_comp(const queue* a, const queue* b) { - const waypoint* x1 = (waypoint*)a; - const waypoint* x2 = (waypoint*)b; + const Waypoint* x1 = (Waypoint*)a; + const Waypoint* x2 = (Waypoint*)b; switch (sort_mode) { case sm_gcid: diff --git a/gpsbabel/stackfilter.cc b/gpsbabel/stackfilter.cc index 4e2c61fae..de738f58d 100644 --- a/gpsbabel/stackfilter.cc +++ b/gpsbabel/stackfilter.cc @@ -109,7 +109,7 @@ stackfilt_process(void) stack = tmp_elt; if (opt_copy) { QUEUE_FOR_EACH(&(stack->waypts), elem, tmp) { - waypt_add(new waypoint(*(waypoint*)elem)); + waypt_add(new Waypoint(*(Waypoint*)elem)); } } @@ -136,7 +136,7 @@ stackfilt_process(void) } if (opt_append) { QUEUE_FOR_EACH(&(stack->waypts), elem, tmp) { - waypt_add((waypoint*)elem); + waypt_add((Waypoint*)elem); } route_append(&(stack->routes)); route_flush(&(stack->routes)); diff --git a/gpsbabel/stmsdf.cc b/gpsbabel/stmsdf.cc index cc88b77c5..5b9c630fe 100644 --- a/gpsbabel/stmsdf.cc +++ b/gpsbabel/stmsdf.cc @@ -64,7 +64,7 @@ static queue trackpts; static QString rte_name; static QString rte_desc; -static waypoint* trkpt_out; +static Waypoint* trkpt_out; static route_head* trk_out; static double trkpt_dist; @@ -166,8 +166,8 @@ parse_header(char* line) static int track_qsort_cb(const void* a, const void* b) { - const waypoint* wa = *(waypoint**)a; - const waypoint* wb = *(waypoint**)b; + const Waypoint* wa = *(Waypoint**)a; + const Waypoint* wb = *(Waypoint**)b; return wa->GetCreationTime().toTime_t() - wb->GetCreationTime().toTime_t(); } @@ -175,7 +175,7 @@ track_qsort_cb(const void* a, const void* b) static void finalize_tracks(void) { - waypoint** list; + Waypoint** list; int count = 0; queue* elem, *tmp; int index; @@ -190,11 +190,11 @@ finalize_tracks(void) return; } - list = (waypoint**)xmalloc(count * sizeof(*list)); + list = (Waypoint**)xmalloc(count * sizeof(*list)); index = 0; QUEUE_FOR_EACH(&trackpts, elem, tmp) { - list[index] = (waypoint*)elem; + list[index] = (Waypoint*)elem; dequeue(elem); index++; } @@ -202,7 +202,7 @@ finalize_tracks(void) qsort(list, count, sizeof(*list), track_qsort_cb); for (index = 0; index < count; index++) { - waypoint* wpt = list[index]; + Waypoint* wpt = list[index]; if (wpt->wpt_flags.fmt_use == 2) { /* log continued */ track = NULL; } @@ -237,7 +237,7 @@ parse_point(char* line) char* str; int column = -1; int what = -1; /* -1 = unknown, 0 = tp, 1 = mp, 2 = wp, 3 = ap */ - waypoint* wpt = NULL; + Waypoint* wpt = NULL; char* cx; int hour, min, sec, day, month, year; @@ -264,7 +264,7 @@ parse_point(char* line) warning(MYNAME ": Unknown point type %s at line %d!\n", str, lineno); return; } - wpt = new waypoint; + wpt = new Waypoint; break; case 1: @@ -433,7 +433,7 @@ data_read(void) static void -calculate(const waypoint* wpt, double* dist, double* speed, double* course, +calculate(const Waypoint* wpt, double* dist, double* speed, double* course, double* asc, double* desc) { if (trkpt_out != NULL) { @@ -516,7 +516,7 @@ any_hdr_calc_cb(const route_head* trk) } static void -any_waypt_calc_cb(const waypoint* wpt) +any_waypt_calc_cb(const Waypoint* wpt) { double speed, course, dist; @@ -547,7 +547,7 @@ any_waypt_calc_cb(const waypoint* wpt) this_time += (wpt->GetCreationTime().toTime_t() - trkpt_out->GetCreationTime().toTime_t()); } - trkpt_out = (waypoint*)wpt; + trkpt_out = (Waypoint*)wpt; } static void @@ -575,7 +575,7 @@ track_disp_hdr_cb(const route_head* trk) static void -track_disp_wpt_cb(const waypoint* wpt) +track_disp_wpt_cb(const Waypoint* wpt) { struct tm tm; char tbuf[32]; @@ -633,7 +633,7 @@ track_disp_wpt_cb(const waypoint* wpt) gbfprintf(fout, ",0\n"); } - trkpt_out = (waypoint*)wpt; + trkpt_out = (Waypoint*)wpt; } static void @@ -650,7 +650,7 @@ route_disp_hdr_cb(const route_head* rte) } static void -route_disp_wpt_cb(const waypoint* wpt) +route_disp_wpt_cb(const Waypoint* wpt) { if (this_route_valid) { QString sn; @@ -667,7 +667,7 @@ route_disp_wpt_cb(const waypoint* wpt) } static void -track_disp_custom_cb(const waypoint* wpt) +track_disp_custom_cb(const Waypoint* wpt) { if (wpt->GetCreationTime().isValid() && (wpt->altitude != unknown_alt)) { gbfprintf(fout, "%d,%.f\n", (int)(wpt->GetCreationTime().toTime_t() - start_time), wpt->altitude); diff --git a/gpsbabel/stmwpp.cc b/gpsbabel/stmwpp.cc index 4b0fce940..602fd232c 100644 --- a/gpsbabel/stmwpp.cc +++ b/gpsbabel/stmwpp.cc @@ -32,7 +32,7 @@ static gbfile* fin, *fout; static route_head* track, *route; -static waypoint* wpt; +static Waypoint* wpt; static short_handle short_h; #define MYNAME "STMwpp" @@ -125,7 +125,7 @@ stmwpp_data_read(void) } what = new_what; - wpt = new waypoint; + wpt = new Waypoint; break; case 1: @@ -175,7 +175,7 @@ stmwpp_data_read(void) route = route_head_alloc(); route_add_head(route); } - route_add_wpt(route, new waypoint(*wpt)); + route_add_wpt(route, new Waypoint(*wpt)); } break; @@ -229,7 +229,7 @@ stmwpp_write_double(const double val) } static void -stmwpp_waypt_cb(const waypoint* wpt) +stmwpp_waypt_cb(const Waypoint* wpt) { char cdate[16], ctime[16]; struct tm tm; diff --git a/gpsbabel/subrip.cc b/gpsbabel/subrip.cc index f1939b74e..d67d29e0e 100644 --- a/gpsbabel/subrip.cc +++ b/gpsbabel/subrip.cc @@ -30,7 +30,7 @@ static char* opt_gpsdate; static time_t time_offset; static int stnum; static gbfile* fout; -static const waypoint* prevwpp; +static const Waypoint* prevwpp; /* internal helper functions */ @@ -84,7 +84,7 @@ subrip_write_time(time_t arg_time) } static void -subrip_prevwp_pr(const waypoint* waypointp) +subrip_prevwp_pr(const Waypoint* waypointp) { /* Now that we have the next waypoint, we can write out the subtitle for * the previous one. @@ -131,7 +131,7 @@ subrip_prevwp_pr(const waypoint* waypointp) /* callback functions */ static void -subrip_trkpt_pr(const waypoint* waypointp) +subrip_trkpt_pr(const Waypoint* waypointp) { /* * To determine the duration of the subtitle, we need the timestamp of the diff --git a/gpsbabel/swapdata.cc b/gpsbabel/swapdata.cc index 40f318386..b6350e68d 100644 --- a/gpsbabel/swapdata.cc +++ b/gpsbabel/swapdata.cc @@ -34,9 +34,9 @@ arglist_t swapdata_args[] = { }; static void -swapdata_cb(const waypoint* ref) +swapdata_cb(const Waypoint* ref) { - waypoint* wpt = (waypoint*)ref; + Waypoint* wpt = (Waypoint*)ref; double x; x = wpt->latitude; diff --git a/gpsbabel/tef_xml.cc b/gpsbabel/tef_xml.cc index bd8df7933..7b9d190e7 100644 --- a/gpsbabel/tef_xml.cc +++ b/gpsbabel/tef_xml.cc @@ -28,7 +28,7 @@ #include "defs.h" #include "xmlgeneric.h" -static waypoint* wpt_tmp; +static Waypoint* wpt_tmp; static int item_count; static int waypoints; static double version; @@ -211,7 +211,7 @@ waypoint_final() if (route != NULL) { if ((via != 0) || (routevia == NULL)) { - waypoint* wpt = new waypoint(*wpt_tmp); + Waypoint* wpt = new Waypoint(*wpt_tmp); route_add_wpt(route, wpt); } } @@ -243,7 +243,7 @@ tef_item_start(xg_string args, const QXmlStreamAttributes* attrv) { waypoints++; - wpt_tmp = new waypoint; + wpt_tmp = new Waypoint; if ((waypoints == 1) || (waypoints == item_count)) { wpt_tmp->wpt_flags.fmt_use ++; } diff --git a/gpsbabel/teletype.cc b/gpsbabel/teletype.cc index a2eb412c5..ee4a56162 100644 --- a/gpsbabel/teletype.cc +++ b/gpsbabel/teletype.cc @@ -59,7 +59,7 @@ teletype_read(void) { uint32_t i; for (i = 0; i < tty_wpt_count; i++) { - waypoint* wpt = new waypoint; + Waypoint* wpt = new Waypoint; wpt->shortname = (gbfgetcstr(fin)); wpt->description = (gbfgetcstr(fin)); diff --git a/gpsbabel/text.cc b/gpsbabel/text.cc index 408824505..765a2babc 100644 --- a/gpsbabel/text.cc +++ b/gpsbabel/text.cc @@ -94,7 +94,7 @@ wr_deinit(void) } static void -text_disp(const waypoint* wpt) +text_disp(const Waypoint* wpt) { int32_t utmz; double utme, utmn; diff --git a/gpsbabel/tiger.cc b/gpsbabel/tiger.cc index 77a0e067a..865ede221 100644 --- a/gpsbabel/tiger.cc +++ b/gpsbabel/tiger.cc @@ -157,7 +157,7 @@ data_read(void) char desc[100]; char icon[100]; char* ibuf; - waypoint* wpt_tmp; + Waypoint* wpt_tmp; int line = 0; while ((ibuf = gbfgetstr(file_in))) { @@ -166,7 +166,7 @@ data_read(void) } if (sscanf(ibuf, "%lf,%lf:%100[^:]:%100[^\n]", &lon, &lat, icon, desc)) { - wpt_tmp = new waypoint; + wpt_tmp = new Waypoint; wpt_tmp->longitude = lon; wpt_tmp->latitude = lat; @@ -179,7 +179,7 @@ data_read(void) } static void -tiger_disp(const waypoint* wpt) +tiger_disp(const Waypoint* wpt) { QString pin; double lat = wpt->latitude; @@ -229,7 +229,7 @@ tiger_disp(const waypoint* wpt) #if CLICKMAP static void -map_plot(const waypoint* wpt) +map_plot(const Waypoint* wpt) { static int x,y; diff --git a/gpsbabel/tmpro.cc b/gpsbabel/tmpro.cc index a09a36d46..de21342fe 100644 --- a/gpsbabel/tmpro.cc +++ b/gpsbabel/tmpro.cc @@ -70,7 +70,7 @@ data_read(void) { char* buff; char* s; - waypoint* wpt_tmp; + Waypoint* wpt_tmp; int i; int linecount = 0; @@ -82,7 +82,7 @@ data_read(void) /* skip the line if it contains "sHyperLink" as it is a header (I hope :) */ if ((strlen(buff)) && (strstr(buff, "sHyperLink") == NULL)) { - wpt_tmp = new waypoint; + wpt_tmp = new Waypoint; /* data delimited by tabs, not enclosed in quotes. */ s = buff; @@ -169,7 +169,7 @@ data_read(void) } static void -tmpro_waypt_pr(const waypoint* wpt) +tmpro_waypt_pr(const Waypoint* wpt) { int icon = 1; /* default to "flag" */ int colour = 255; /*default to red */ diff --git a/gpsbabel/tomtom.cc b/gpsbabel/tomtom.cc index 9eb72146b..d6ffbcba7 100644 --- a/gpsbabel/tomtom.cc +++ b/gpsbabel/tomtom.cc @@ -152,7 +152,7 @@ data_read(void) long x; long y; char* desc; - waypoint* wpt_tmp; + Waypoint* wpt_tmp; while (!gbfeof(file_in)) { rectype = read_char(file_in); if (rectype == EOF) { @@ -191,7 +191,7 @@ data_read(void) desc = (char*)xmalloc(recsize - 13); gbfread(desc, recsize-13, 1, file_in); - wpt_tmp = new waypoint; + wpt_tmp = new Waypoint; wpt_tmp->longitude = x/100000.0; wpt_tmp->latitude = y/100000.0; @@ -212,7 +212,7 @@ data_read(void) #if 0 // Fallthrough for now to silently ignore these until this is done. recsize = read_char(file_in) ; check_recsize(recsize); - wpt_tmp = new waypoint; + wpt_tmp = new Waypoint; decode_latlon(&wpt_tmp->latitude, &wpt_tmp->longitude); gbfread(tbuf, 3, 1, file_in); gbfread(tbuf, 3, 1, file_in); @@ -241,7 +241,7 @@ data_read(void) struct hdr { - waypoint* wpt; + Waypoint* wpt; }; static int compare_lon(const void* a, const void* b); @@ -375,7 +375,7 @@ compute_blocks(struct hdr* start, int count, newblock->size = 4 * 5 + 1; /* hdr is 5 longs, 1 char */ if (count < 20) { int i; - waypoint* wpt = NULL; + Waypoint* wpt = NULL; for (i = 0; i < count; i++) { newblock->size += 4 * 3 + 1; @@ -436,7 +436,7 @@ data_write(void) struct hdr* htable, *bh; queue* elem, *tmp; extern queue waypt_head; - waypoint* waypointp; + Waypoint* waypointp; double minlon = 200; double maxlon = -200; double minlat = 200; @@ -447,7 +447,7 @@ data_write(void) bh = htable; QUEUE_FOR_EACH(&waypt_head, elem, tmp) { - waypointp = (waypoint*) elem; + waypointp = (Waypoint*) elem; bh->wpt = waypointp; if (waypointp->longitude > maxlon) { maxlon = waypointp->longitude; diff --git a/gpsbabel/tpg.cc b/gpsbabel/tpg.cc index e56bc40a1..c41dd9f33 100644 --- a/gpsbabel/tpg.cc +++ b/gpsbabel/tpg.cc @@ -103,7 +103,7 @@ static void tpg_read(void) { char buff[MAXTPGSTRINGSIZE + 1]; - waypoint* wpt_tmp; + Waypoint* wpt_tmp; double lat, lon, elev; double amt; short int pointcount; @@ -119,7 +119,7 @@ tpg_read(void) while (pointcount--) { - wpt_tmp = new waypoint; + wpt_tmp = new Waypoint; /* pascal-like shortname */ wpt_tmp->shortname = gbfgetpstr(tpg_file_in); @@ -166,7 +166,7 @@ tpg_read(void) } static void -tpg_waypt_pr(const waypoint* wpt) +tpg_waypt_pr(const Waypoint* wpt) { double lon, lat; double amt; diff --git a/gpsbabel/tpo.cc b/gpsbabel/tpo.cc index 0d4fef280..c1bb98b4d 100644 --- a/gpsbabel/tpo.cc +++ b/gpsbabel/tpo.cc @@ -261,7 +261,7 @@ void tpo_read_2_x(void) short* lon_delta, *lat_delta; int i, j; route_head* track_temp; - waypoint* waypoint_temp; + Waypoint* waypoint_temp; /* track count */ track_count = gbfgetint16(tpo_file_in); @@ -342,7 +342,7 @@ void tpo_read_2_x(void) /* multiply all the deltas by the scaling factors to determine the waypoint positions */ for (j=0; jwaypoint_list); + Waypoint* first_track_waypoint = (Waypoint*) QUEUE_FIRST(&rte->waypoint_list); /* zoom level 1-5 visibility flags */ gbfwrite(visibility_flags, 1, sizeof(visibility_flags), tpo_file_out); @@ -1809,7 +1809,7 @@ tpo_track_hdr(const route_head* rte) } static void -tpo_track_disp(const waypoint* waypointp) +tpo_track_disp(const Waypoint* waypointp) { double lat, lon, amt, x, y, z; short lat_delta, lon_delta; diff --git a/gpsbabel/trackfilter.cc b/gpsbabel/trackfilter.cc index 3b11acb5d..c37297258 100644 --- a/gpsbabel/trackfilter.cc +++ b/gpsbabel/trackfilter.cc @@ -276,8 +276,8 @@ trackfilter_init_qsort_cb(const void* a, const void* b) static int trackfilter_merge_qsort_cb(const void* a, const void* b) { - const waypoint* wa = *(waypoint**)a; - const waypoint* wb = *(waypoint**)b; + const Waypoint* wa = *(Waypoint**)a; + const Waypoint* wb = *(Waypoint**)b; const QDateTime dta = wa->GetCreationTime(); const QDateTime dtb = wb->GetCreationTime(); @@ -324,7 +324,7 @@ static void trackfilter_fill_track_list_cb(const route_head* track) /* callback for track_disp_all */ { int i; - waypoint* wpt, *prev; + Waypoint* wpt, *prev; queue* elem, *tmp; if (track->rte_waypt_ct == 0) { @@ -336,7 +336,7 @@ trackfilter_fill_track_list_cb(const route_head* track) /* callback for track_d if ((track->rte_name == NULL) || (case_ignore_str_match(CSTRc(track->rte_name), opt_name) == 0)) { QUEUE_FOR_EACH((queue*)&track->waypoint_list, elem, tmp) { - waypoint* wpt = (waypoint*)elem; + Waypoint* wpt = (Waypoint*)elem; track_del_wpt((route_head*)track, wpt); delete wpt; } @@ -353,7 +353,7 @@ trackfilter_fill_track_list_cb(const route_head* track) /* callback for track_d QUEUE_FOR_EACH((queue*)&track->waypoint_list, elem, tmp) { track_pts++; - wpt = (waypoint*)elem; + wpt = (Waypoint*)elem; if (!wpt->creation_time.isValid()) { timeless_pts++; } @@ -419,12 +419,12 @@ trackfilter_pack_init_rte_name(route_head* track, const time_t default_time) if (strchr(opt_title, '%') != NULL) { struct tm tm; - waypoint* wpt; + Waypoint* wpt; if (track->rte_waypt_ct == 0) { tm = *localtime(&default_time); } else { - wpt = (waypoint*) QUEUE_FIRST((queue*)&track->waypoint_list); + wpt = (Waypoint*) QUEUE_FIRST((queue*)&track->waypoint_list); time_t t = wpt->GetCreationTime().toTime_t(); tm = *localtime(&t); } @@ -484,7 +484,7 @@ trackfilter_pack(void) route_head* curr = track_list[i].track; QUEUE_FOR_EACH((queue*)&curr->waypoint_list, elem, tmp) { - waypoint* wpt = (waypoint*)elem; + Waypoint* wpt = (Waypoint*)elem; track_del_wpt(curr, wpt); track_add_wpt(master, wpt); } @@ -504,23 +504,23 @@ trackfilter_merge(void) int i, j, dropped; queue* elem, *tmp; - waypoint** buff; - waypoint* prev, *wpt; + Waypoint** buff; + Waypoint* prev, *wpt; route_head* master = track_list[0].track; if (track_pts-timeless_pts < 1) { return; } - buff = (waypoint**)xcalloc(track_pts-timeless_pts, sizeof(*buff)); + buff = (Waypoint**)xcalloc(track_pts-timeless_pts, sizeof(*buff)); j = 0; for (i = 0; i < track_ct; i++) { /* put all points into temp buffer */ route_head* track = track_list[i].track; QUEUE_FOR_EACH((queue*)&track->waypoint_list, elem, tmp) { - wpt = (waypoint*)elem; + wpt = (Waypoint*)elem; if (wpt->creation_time.isValid()) { - buff[j++] = new waypoint(*wpt); + buff[j++] = new Waypoint(*wpt); } track_del_wpt(track, wpt); delete wpt; @@ -564,8 +564,8 @@ trackfilter_split(void) route_head* master = track_list[0].track; int count = master->rte_waypt_ct; - waypoint** buff; - waypoint* wpt; + Waypoint** buff; + Waypoint* wpt; queue* elem, *tmp; int i, j; double interval = -1; @@ -674,11 +674,11 @@ trackfilter_split(void) trackfilter_split_init_rte_name(master, track_list[0].first_time); - buff = (waypoint**) xcalloc(count, sizeof(*buff)); + buff = (Waypoint**) xcalloc(count, sizeof(*buff)); i = 0; QUEUE_FOR_EACH((queue*)&master->waypoint_list, elem, tmp) { - wpt = (waypoint*)elem; + wpt = (Waypoint*)elem; buff[i++] = wpt; } @@ -763,7 +763,7 @@ trackfilter_move(void) { int i; queue* elem, *tmp; - waypoint* wpt; + Waypoint* wpt; time_t delta; delta = trackfilter_parse_time_opt(opt_move); @@ -774,7 +774,7 @@ trackfilter_move(void) for (i = 0; i < track_ct; i++) { route_head* track = track_list[i].track; QUEUE_FOR_EACH((queue*)&track->waypoint_list, elem, tmp) { - wpt = (waypoint*)elem; + wpt = (Waypoint*)elem; wpt->creation_time += delta; } @@ -792,7 +792,7 @@ trackfilter_synth(void) { int i; queue* elem, *tmp; - waypoint* wpt; + Waypoint* wpt; double oldlat = -999; double oldlon = -999; @@ -807,7 +807,7 @@ trackfilter_synth(void) route_head* track = track_list[i].track; first = 1; QUEUE_FOR_EACH((queue*)&track->waypoint_list, elem, tmp) { - wpt = (waypoint*)elem; + wpt = (Waypoint*)elem; if (opt_fix) { wpt->fix = fix; if (wpt->sat == 0) { @@ -908,7 +908,7 @@ trackfilter_range(void) /* returns number of track points left after filtering route_head* track = track_list[i].track; QUEUE_FOR_EACH((queue*)&track->waypoint_list, elem, tmp) { - waypoint* wpt = (waypoint*)elem; + Waypoint* wpt = (Waypoint*)elem; if (wpt->creation_time.isValid()) { inside = ((wpt->GetCreationTime().toTime_t() >= start) && (wpt->GetCreationTime().toTime_t() <= stop)); } @@ -955,7 +955,7 @@ trackfilter_seg2trk(void) int trk_seg_num = 1, first = 1; QUEUE_FOR_EACH((queue*)&src->waypoint_list, elem, tmp) { - waypoint* wpt = (waypoint*)elem; + Waypoint* wpt = (Waypoint*)elem; if (wpt->wpt_flags.new_trkseg && !first) { dest = route_head_alloc(); @@ -1006,7 +1006,7 @@ trackfilter_trk2seg(void) first = 1; QUEUE_FOR_EACH((queue*)&curr->waypoint_list, elem, tmp) { - waypoint* wpt = (waypoint*)elem; + Waypoint* wpt = (Waypoint*)elem; int orig_new_trkseg = wpt->wpt_flags.new_trkseg; @@ -1110,7 +1110,7 @@ trackfilter_faketime(void) /* returns number of track points left af route_head* track = track_list[i].track; QUEUE_FOR_EACH((queue*)&track->waypoint_list, elem, tmp) { - waypoint* wpt = (waypoint*)elem; + Waypoint* wpt = (Waypoint*)elem; if (opt_faketime != 0 && (!wpt->creation_time.isValid() || faketime.force)) { wpt->creation_time = QDateTime::fromTime_t(faketime.start); @@ -1123,7 +1123,7 @@ trackfilter_faketime(void) /* returns number of track points left af } static int -trackfilter_points_are_same(const waypoint* wpta, const waypoint* wptb) +trackfilter_points_are_same(const Waypoint* wpta, const Waypoint* wptb) { // We use a simpler (non great circle) test for lat/lon here as this // is used for keeping the 'bookends' of non-moving points. @@ -1152,13 +1152,13 @@ trackfilter_segment_head(const route_head* rte) queue* elem, *tmp; double avg_dist = 0; int index = 0; - waypoint* prev_wpt = NULL; + Waypoint* prev_wpt = NULL; // Consider tossing trackpoints closer than this in radians. // (Empirically determined; It's a few dozen feet.) const double ktoo_close = 0.000005; QUEUE_FOR_EACH(&rte->waypoint_list, elem, tmp) { - waypoint* wpt = (waypoint*)elem; + Waypoint* wpt = (Waypoint*)elem; if (index > 0) { double cur_dist = gcdist(RAD(prev_wpt->latitude), RAD(prev_wpt->longitude), @@ -1170,8 +1170,8 @@ trackfilter_segment_head(const route_head* rte) } if (cur_dist < ktoo_close) { - if (wpt != (waypoint*) QUEUE_LAST(&rte->waypoint_list)) { - waypoint* next_wpt = (waypoint*) QUEUE_NEXT(&wpt->Q); + if (wpt != (Waypoint*) QUEUE_LAST(&rte->waypoint_list)) { + Waypoint* next_wpt = (Waypoint*) QUEUE_NEXT(&wpt->Q); if (trackfilter_points_are_same(prev_wpt, wpt) && trackfilter_points_are_same(wpt, next_wpt)) { track_del_wpt((route_head*)rte, wpt); diff --git a/gpsbabel/transform.cc b/gpsbabel/transform.cc index af5b79e83..be048b4b4 100644 --- a/gpsbabel/transform.cc +++ b/gpsbabel/transform.cc @@ -88,14 +88,14 @@ transform_waypoints(void) break; } #if NEWQ - foreach(waypoint* wpt, waypt_list) { + foreach(Waypoint* wpt, waypt_list) { #else queue* elem, *tmp; QUEUE_FOR_EACH(&waypt_head, elem, tmp) { - waypoint* wpt = (waypoint*) elem; + Waypoint* wpt = (Waypoint*) elem; #endif - wpt = new waypoint(*wpt); + wpt = new Waypoint(*wpt); switch (current_target) { case 'R': route_add_wpt_named(rte, wpt, RPT, name_digits); @@ -151,9 +151,9 @@ transform_trk_disp_hdr_cb(const route_head* trk) } static void -transform_any_disp_wpt_cb(const waypoint* wpt) +transform_any_disp_wpt_cb(const Waypoint* wpt) { - waypoint* temp = new waypoint(*wpt); + Waypoint* temp = new Waypoint(*wpt); if (current_target == 'R') { route_add_wpt_named(current_rte, temp, current_namepart, name_digits); } else if (current_target == 'T') { diff --git a/gpsbabel/unicsv.cc b/gpsbabel/unicsv.cc index bb23dbb41..7b73b29fd 100644 --- a/gpsbabel/unicsv.cc +++ b/gpsbabel/unicsv.cc @@ -633,7 +633,7 @@ static void unicsv_parse_one_line(char* ibuf) { char* s; - waypoint* wpt = NULL; + Waypoint* wpt = NULL; int column; int utm_zone = -9999; double utm_easting = 0; @@ -655,7 +655,7 @@ unicsv_parse_one_line(char* ibuf) int ns = 1; int ew = 1; geocache_data* gc_data = NULL; - wpt = new waypoint; + wpt = new Waypoint; wpt->latitude = unicsv_unknown; wpt->longitude = unicsv_unknown; memset(&ymd, 0, sizeof(ymd)); @@ -1238,7 +1238,7 @@ unicsv_rd(void) /* =========================================================================== */ static void -unicsv_fatal_outside(const waypoint* wpt) +unicsv_fatal_outside(const Waypoint* wpt) { gbfprintf(fout, "#####\n"); fatal(MYNAME ": %s (%s) is outside of convertable area of grid \"%s\"!\n", @@ -1287,7 +1287,7 @@ unicsv_print_data_time(const QDateTime& idt) #define FIELD_USED(a) (gb_getbit(&unicsv_outp_flags, a)) static void -unicsv_waypt_enum_cb(const waypoint* wpt) +unicsv_waypt_enum_cb(const Waypoint* wpt) { garmin_fs_t* gmsd; @@ -1448,7 +1448,7 @@ unicsv_waypt_enum_cb(const waypoint* wpt) } static void -unicsv_waypt_disp_cb(const waypoint* wpt) +unicsv_waypt_disp_cb(const Waypoint* wpt) { double lat, lon, alt; char* cout = NULL; diff --git a/gpsbabel/util.cc b/gpsbabel/util.cc index 891cf3381..df4b87f4d 100644 --- a/gpsbabel/util.cc +++ b/gpsbabel/util.cc @@ -875,7 +875,7 @@ void dotnet_time_to_time_t(double dotnet, time_t* t, int* millisecs) * formats do lookups based on these strings. */ const char* -get_cache_icon(const waypoint* waypointp) +get_cache_icon(const Waypoint* waypointp) { if (!global_opts.smart_icons) { return NULL; diff --git a/gpsbabel/v900.cc b/gpsbabel/v900.cc index 3c17b6676..fdf656803 100644 --- a/gpsbabel/v900.cc +++ b/gpsbabel/v900.cc @@ -241,7 +241,7 @@ v900_read(void) track_add_head(track); while (1) { - waypoint* wpt; + Waypoint* wpt; char c; int bad = 0; int record_len = is_advanced_mode ? sizeof(line.adv) : sizeof(line.bas); @@ -300,7 +300,7 @@ v900_read(void) line.bas.cr = 0; /* null terminate vox field */ } - wpt = new waypoint; + wpt = new Waypoint; /* lat is a string in the form: 31.768380N */ c = line.bas.common.latitude_NS; /* N/S */ @@ -356,13 +356,13 @@ v900_read(void) track_add_wpt(track, wpt); if (line.bas.common.tag != 'T') { - waypoint* wpt2; + Waypoint* wpt2; // A 'G' tag appears to be a 'T' tag, but generated on the trailing // edge of a DGPS fix as it decays to an SPS fix. See 1/13/13 email // thread on gpsbabel-misc with Jamie Robertson. assert(line.bas.common.tag == 'C' || line.bas.common.tag == 'G' || line.bas.common.tag == 'V'); - wpt2 = new waypoint(*wpt); + wpt2 = new Waypoint(*wpt); if (line.bas.common.tag == 'V') { // waypoint with voice recording? char vox_file_name[sizeof(line.adv.vox)+5]; const char* vox = is_advanced_mode ? line.adv.vox : line.bas.vox; diff --git a/gpsbabel/validate.cc b/gpsbabel/validate.cc index 8cc9f24f7..b15a714ea 100644 --- a/gpsbabel/validate.cc +++ b/gpsbabel/validate.cc @@ -66,7 +66,7 @@ static void validate_head_trl(const route_head* header) } } -static void validate_point(const waypoint* waypointp) +static void validate_point(const Waypoint* waypointp) { point_ct += 1; } diff --git a/gpsbabel/vcf.cc b/gpsbabel/vcf.cc index e1fb68d42..a2387e13e 100644 --- a/gpsbabel/vcf.cc +++ b/gpsbabel/vcf.cc @@ -95,7 +95,7 @@ vcf_print(const char* s) } static void -vcf_disp(const waypoint* wpt) +vcf_disp(const Waypoint* wpt) { int latint, lonint; diff --git a/gpsbabel/vidaone.cc b/gpsbabel/vidaone.cc index 335ec6ad1..8ecc9cb4e 100644 --- a/gpsbabel/vidaone.cc +++ b/gpsbabel/vidaone.cc @@ -77,7 +77,7 @@ vidaone_read(void) route_head* trk = NULL; while (! gbfeof(fin)) { - waypoint* wpt = new waypoint; + Waypoint* wpt = new Waypoint; wpt->latitude = gbfgetdbl(fin); wpt->longitude = gbfgetdbl(fin); @@ -114,7 +114,7 @@ vidaone_wr_deinit(void) } static void -vidaone_trkpt(const waypoint* wpt) +vidaone_trkpt(const Waypoint* wpt) { gbfputdbl(wpt->latitude, fout); gbfputdbl(wpt->longitude, fout); diff --git a/gpsbabel/vitosmt.cc b/gpsbabel/vitosmt.cc index 131e48304..3d8582158 100644 --- a/gpsbabel/vitosmt.cc +++ b/gpsbabel/vitosmt.cc @@ -77,7 +77,7 @@ vitosmt_read(void) long check2 =-2; long check3 =-3; route_head* route_head =0; - waypoint* wpt_tmp =0; + Waypoint* wpt_tmp =0; double latrad =0; double lonrad =0; double elev =0; @@ -154,7 +154,7 @@ vitosmt_read(void) gpsvalid =gbfgetc(infile); /* fix is valid */ gpssats =gbfgetc(infile); /* number of sats */ - wpt_tmp = new waypoint; + wpt_tmp = new Waypoint; wpt_tmp->latitude =DEG(latrad); wpt_tmp->longitude =DEG(lonrad); @@ -241,7 +241,7 @@ wr_deinit(void) } static void -vitosmt_waypt_pr(const waypoint* waypointp) +vitosmt_waypt_pr(const Waypoint* waypointp) { unsigned char* workbuffer =0; size_t position =0; diff --git a/gpsbabel/vitovtt.cc b/gpsbabel/vitovtt.cc index f672b9a8f..015731113 100644 --- a/gpsbabel/vitovtt.cc +++ b/gpsbabel/vitovtt.cc @@ -63,7 +63,7 @@ vitovtt_read(void) { int version = 0; route_head* route_head = 0; - waypoint* wpt_tmp = 0; + Waypoint* wpt_tmp = 0; int scaled_lat = 0; int scaled_lon = 0; double altitude = 0; @@ -103,7 +103,7 @@ vitovtt_read(void) course = gbfgetint16(infile); status = gbfgetint32(infile); - wpt_tmp = new waypoint; + wpt_tmp = new Waypoint; wpt_tmp->latitude = scaled_lat / vitovtt_latitudescale; wpt_tmp->longitude = scaled_lon / vitovtt_longitudescale; diff --git a/gpsbabel/vpl.cc b/gpsbabel/vpl.cc index 97abf82ee..c8fb387c3 100644 --- a/gpsbabel/vpl.cc +++ b/gpsbabel/vpl.cc @@ -174,7 +174,7 @@ vpl_parse_75_sentence(const char* ibuf) int16_t alt, speed_raw; uint16_t hdg_raw; uint8_t sats, hdop_raw, vdop_raw; - waypoint* waypt; + Waypoint* waypt; struct tm tm; // The files have DOS line endings (CR/LF) but we don't care, because we @@ -195,7 +195,7 @@ vpl_parse_75_sentence(const char* ibuf) ymd /= 100; tm.tm_year = ymd % 100 + 100; - waypt = new waypoint; + waypt = new Waypoint; // Lat/Lon are both stored *0xE1000 which we have to divide out // for decimal degrees diff --git a/gpsbabel/waypt.cc b/gpsbabel/waypt.cc index 3f0071b95..3abaceb04 100644 --- a/gpsbabel/waypt.cc +++ b/gpsbabel/waypt.cc @@ -31,7 +31,7 @@ #include "session.h" #if NEWQ -QList waypt_list; +QList waypt_list; queue waypt_head; // This is here solely to freak out the formats that are // looking into what should be a private members. #else @@ -40,7 +40,7 @@ queue waypt_head; static unsigned int waypt_ct; static short_handle mkshort_handle; -geocache_data waypoint::empty_gc_data; +geocache_data Waypoint::empty_gc_data; static global_trait traits; const global_trait* get_traits(void) @@ -59,7 +59,7 @@ waypt_init(void) #endif } -void update_common_traits(const waypoint* wpt) +void update_common_traits(const Waypoint* wpt) { /* This is a bit tacky, but it allows a hint whether we've seen * this data or not in the life cycle of this run. Of course, @@ -76,7 +76,7 @@ void update_common_traits(const waypoint* wpt) } void -waypt_add(waypoint* wpt) +waypt_add(Waypoint* wpt) { double lat_orig = wpt->latitude; double lon_orig = wpt->longitude; @@ -142,7 +142,7 @@ waypt_add(waypoint* wpt) } void -waypt_del(waypoint* wpt) +waypt_del(Waypoint* wpt) { #if NEWQ #else @@ -168,7 +168,7 @@ set_waypt_count(unsigned int nc) } void -waypt_disp(const waypoint* wpt) +waypt_disp(const Waypoint* wpt) { if (wpt->GetCreationTime().isValid()) { printf("%s ", qPrintable(wpt->creation_time.toString())); @@ -215,12 +215,12 @@ waypt_disp_session(const session_t* se, waypt_cb cb) { int i = 0; #if NEWQ - foreach(waypoint* waypointp, waypt_list) { + foreach(Waypoint* waypointp, waypt_list) { #else queue* elem, *tmp; - waypoint* waypointp; + Waypoint* waypointp; QUEUE_FOR_EACH(&waypt_head, elem, tmp) { - waypointp = (waypoint*) elem; + waypointp = (Waypoint*) elem; #endif if ((se == NULL) || (waypointp->session == se)) { if (global_opts.verbose_status) { @@ -258,7 +258,7 @@ waypt_bounds_valid(bounds* bounds) * Recompund bounding box based on new position point. */ void -waypt_add_to_bounds(bounds* bounds, const waypoint* waypointp) +waypt_add_to_bounds(bounds* bounds, const Waypoint* waypointp) { if (waypointp->latitude > bounds->max_lat) { bounds->max_lat = waypointp->latitude; @@ -293,28 +293,28 @@ waypt_compute_bounds(bounds* bounds) { waypt_init_bounds(bounds); #if NEWQ - foreach(waypoint* waypointp, waypt_list) { + foreach(Waypoint* waypointp, waypt_list) { #else queue* elem, *tmp; - waypoint* waypointp; + Waypoint* waypointp; QUEUE_FOR_EACH(&waypt_head, elem, tmp) { - waypointp = (waypoint*) elem; + waypointp = (Waypoint*) elem; #endif waypt_add_to_bounds(bounds, waypointp); } } -waypoint* +Waypoint* find_waypt_by_name(const QString& name) { #if NEWQ - foreach(waypoint* waypointp, waypt_list) { + foreach(Waypoint* waypointp, waypt_list) { #else queue* elem, *tmp; - waypoint* waypointp; + Waypoint* waypointp; QUEUE_FOR_EACH(&waypt_head, elem, tmp) { - waypointp = (waypoint*) elem; + waypointp = (Waypoint*) elem; #endif if (waypointp->shortname == name) { return waypointp; @@ -339,7 +339,7 @@ waypt_flush(queue* head) queue* elem, *tmp; QUEUE_FOR_EACH(head, elem, tmp) { - waypoint* q = (waypoint*) dequeue(elem); + Waypoint* q = (Waypoint*) dequeue(elem); delete q; if (head == &waypt_head) { waypt_ct--; @@ -364,7 +364,7 @@ void waypt_backup(signed int* count, queue** head_bak) { queue* elem, *tmp, *qbackup; - waypoint* wpt; + Waypoint* wpt; int no = 0; qbackup = (queue*) xcalloc(1, sizeof(*qbackup)); @@ -380,8 +380,8 @@ waypt_backup(signed int* count, queue** head_bak) waypt_ct = 0; QUEUE_FOR_EACH(qbackup, elem, tmp) { - wpt = (waypoint*)elem; - waypt_add(new waypoint(*wpt)); + wpt = (Waypoint*)elem; + waypt_add(new Waypoint(*wpt)); no++; } @@ -408,7 +408,7 @@ waypt_restore(signed int count, queue* head_bak) } void -waypt_add_url(waypoint* wpt, const QString& link, const QString& url_link_text) +waypt_add_url(Waypoint* wpt, const QString& link, const QString& url_link_text) { wpt->url_link_list_.push_back(UrlLink(link, url_link_text)); } @@ -432,7 +432,7 @@ gcgeodist(const double lat1, const double lon1, */ double -waypt_time(const waypoint* wpt) +waypt_time(const Waypoint* wpt) { if (!wpt->creation_time.isValid()) { return (double) 0; @@ -448,7 +448,7 @@ waypt_time(const waypoint* wpt) */ double -waypt_distance_ex(const waypoint* A, const waypoint* B) +waypt_distance_ex(const Waypoint* A, const Waypoint* B) { double res = 0; garmin_fs_p gmsd; @@ -475,7 +475,7 @@ waypt_distance_ex(const waypoint* A, const waypoint* B) } double -waypt_distance(const waypoint* A, const waypoint* B) +waypt_distance(const Waypoint* A, const Waypoint* B) { if ((A == NULL) || (B == NULL)) { return 0; @@ -491,7 +491,7 @@ waypt_distance(const waypoint* A, const waypoint* B) */ double -waypt_speed_ex(const waypoint* A, const waypoint* B) +waypt_speed_ex(const Waypoint* A, const Waypoint* B) { double dist, time; @@ -514,7 +514,7 @@ waypt_speed_ex(const waypoint* A, const waypoint* B) */ double -waypt_speed(const waypoint* A, const waypoint* B) +waypt_speed(const Waypoint* A, const Waypoint* B) { double dist, time; @@ -535,7 +535,7 @@ waypt_speed(const waypoint* A, const waypoint* B) * Calculates "Course True" from A to B */ double -waypt_course(const waypoint* A, const waypoint* B) +waypt_course(const Waypoint* A, const Waypoint* B) { if (A && B) { return heading_true_degrees(RAD(A->latitude), RAD(A->longitude), RAD(B->latitude), RAD(B->longitude)); @@ -544,7 +544,7 @@ waypt_course(const waypoint* A, const waypoint* B) } } -waypoint::waypoint() : +Waypoint::Waypoint() : // Q(), latitude(0), // These should probably use some invalid data, but longitude(0), // it looks like we have code that relies on them being zero. @@ -573,7 +573,7 @@ waypoint::waypoint() : power(0), temperature(0), odometer_distance(0), - gc_data(&waypoint::empty_gc_data), + gc_data(&Waypoint::empty_gc_data), fs(NULL), session(curr_session()), extra_data(NULL) @@ -581,15 +581,15 @@ waypoint::waypoint() : QUEUE_INIT(&Q); } -waypoint::~waypoint() +Waypoint::~Waypoint() { - if (gc_data != &waypoint::empty_gc_data) { + if (gc_data != &Waypoint::empty_gc_data) { delete gc_data; } fs_chain_destroy(fs); } -waypoint::waypoint(const waypoint& other) : +Waypoint::Waypoint(const Waypoint& other) : // Q(other.Q), latitude(other.latitude), longitude(other.longitude), @@ -622,7 +622,7 @@ waypoint::waypoint(const waypoint& other) : extra_data(other.extra_data) { // deep copy geocache data unless it is the specail static empty_gc_data. - if (other.gc_data != &waypoint::empty_gc_data) { + if (other.gc_data != &Waypoint::empty_gc_data) { gc_data = new geocache_data(*other.gc_data); } @@ -639,7 +639,7 @@ waypoint::waypoint(const waypoint& other) : // note: extra_data is not deep copied. } -waypoint& waypoint::operator=(const waypoint& other) +Waypoint& Waypoint::operator=(const Waypoint& other) { // the default assignment operator is not appropriate as we do deep copy of some members, // and we haven't bothered to write an appropriate one. @@ -648,31 +648,31 @@ waypoint& waypoint::operator=(const waypoint& other) } bool -waypoint::HasUrlLink() const +Waypoint::HasUrlLink() const { return !url_link_list_.isEmpty(); } const UrlLink& -waypoint::GetUrlLink() const +Waypoint::GetUrlLink() const { return url_link_list_[0]; } const QList -waypoint::GetUrlLinks() const +Waypoint::GetUrlLinks() const { return url_link_list_; } void -waypoint::AddUrlLink(const UrlLink l) +Waypoint::AddUrlLink(const UrlLink l) { url_link_list_.push_back(l); } QString -waypoint::CreationTimeXML() const +Waypoint::CreationTimeXML() const { if (!creation_time.isValid()) { return NULL; @@ -690,41 +690,41 @@ waypoint::CreationTimeXML() const } gpsbabel::DateTime -waypoint::GetCreationTime() const +Waypoint::GetCreationTime() const { return creation_time; } void -waypoint::SetCreationTime(gpsbabel::DateTime t) +Waypoint::SetCreationTime(gpsbabel::DateTime t) { creation_time = t; } void -waypoint::SetCreationTime(time_t t) +Waypoint::SetCreationTime(time_t t) { creation_time = QDateTime::fromTime_t(t); } void -waypoint::SetCreationTime(time_t t, int ms) +Waypoint::SetCreationTime(time_t t, int ms) { creation_time.setTime_t(t); creation_time = creation_time.addMSecs(ms); } geocache_data* -waypoint::AllocGCData() +Waypoint::AllocGCData() { - if (gc_data == &waypoint::empty_gc_data) { + if (gc_data == &Waypoint::empty_gc_data) { gc_data = new geocache_data; } return gc_data; } int -waypoint::EmptyGCData() const +Waypoint::EmptyGCData() const { - return (gc_data == &waypoint::empty_gc_data); + return (gc_data == &Waypoint::empty_gc_data); } diff --git a/gpsbabel/wbt-200.cc b/gpsbabel/wbt-200.cc index 8c02e8437..f9ef2a6c4 100644 --- a/gpsbabel/wbt-200.cc +++ b/gpsbabel/wbt-200.cc @@ -540,10 +540,10 @@ static int check_date(uint32_t tim) mday > 0 && mday <= 31 && mon > 0 && mon <= 12 && year >= 4; } -static waypoint* make_point(double lat, double lon, double alt, time_t tim, const char* fmt, int index) +static Waypoint* make_point(double lat, double lon, double alt, time_t tim, const char* fmt, int index) { char wp_name[20]; - waypoint* wpt = new waypoint; + Waypoint* wpt = new Waypoint; sprintf(wp_name, fmt, index); @@ -556,12 +556,12 @@ static waypoint* make_point(double lat, double lon, double alt, time_t tim, cons return wpt; } -static waypoint* make_waypoint(struct read_state* st, double lat, double lon, double alt, time_t tim) +static Waypoint* make_waypoint(struct read_state* st, double lat, double lon, double alt, time_t tim) { return make_point(lat, lon, alt, tim, "WP%04d", ++st->wpn); } -static waypoint* make_trackpoint(struct read_state* st, double lat, double lon, double alt, time_t tim) +static Waypoint* make_trackpoint(struct read_state* st, double lat, double lon, double alt, time_t tim) { return make_point(lat, lon, alt, tim, "TP%04d", ++st->tpn); } @@ -571,7 +571,7 @@ static int wbt200_data_chunk(struct read_state* st, const void* buf, int fmt) uint32_t tim; double lat, lon, alt; time_t rtim; - waypoint* tpt = NULL; + Waypoint* tpt = NULL; const char* bp = (const char*) buf; size_t buf_used = fmt_version[fmt].reclen; @@ -808,7 +808,7 @@ static int wbt201_data_chunk(struct read_state* st, const void* buf) uint16_t flags; double lat, lon, alt; time_t rtim; - waypoint* tpt = NULL; + Waypoint* tpt = NULL; const char* bp = (const char*) buf; /* Zero records are skipped */ @@ -831,7 +831,7 @@ static int wbt201_data_chunk(struct read_state* st, const void* buf) rtim = decode_date(tim); if ((flags & WBT201_WAYPOINT) && (global_opts.masked_objective & WPTDATAMASK)) { - waypoint* wpt = make_waypoint(st, lat, lon, alt, rtim); + Waypoint* wpt = make_waypoint(st, lat, lon, alt, rtim); waypt_add(wpt); } diff --git a/gpsbabel/wfff_xml.cc b/gpsbabel/wfff_xml.cc index 48721d341..71a9bf28c 100644 --- a/gpsbabel/wfff_xml.cc +++ b/gpsbabel/wfff_xml.cc @@ -219,11 +219,11 @@ static long tosscount=0; void wfff_e(xg_string args, const QXmlStreamAttributes* unused) { - waypoint* wpt_tmp =0; + Waypoint* wpt_tmp =0; char desc[255] ="\0"; if ((ap_hdop>=1)&&(ap_hdop<50)) { // Discard invalid GPS fix - wpt_tmp = new waypoint; + wpt_tmp = new Waypoint; if (snmac) { wpt_tmp->shortname = ap_mac; diff --git a/gpsbabel/wintec_tes.cc b/gpsbabel/wintec_tes.cc index 1348e464f..0f1f96587 100644 --- a/gpsbabel/wintec_tes.cc +++ b/gpsbabel/wintec_tes.cc @@ -60,7 +60,7 @@ wintec_tes_read(void) track_add_head(trk); while (!gbfeof(fin)) { - waypoint* wpt; + Waypoint* wpt; uint16_t flags = gbfgetuint16(fin); uint32_t date = gbfgetuint32(fin); int32_t latitude = gbfgetint32(fin); @@ -68,7 +68,7 @@ wintec_tes_read(void) int16_t alt = gbfgetint16(fin); // Signed. Meters. (void) flags; // Silence 'unused' warning until we use flags. - wpt = new waypoint; + wpt = new Waypoint; wpt->latitude = latitude / 1.0e7; wpt->longitude = longitude / 1.0e7; wpt->SetCreationTime(wintec_date_to_time(date)); @@ -85,7 +85,7 @@ wintec_tes_read(void) // Wintec's software puts a waypoint in the track, so we // mock that. if (flags & 0x02) { - waypoint* temp = new waypoint(*wpt); + Waypoint* temp = new Waypoint(*wpt); waypt_add(temp); } diff --git a/gpsbabel/xcsv.cc b/gpsbabel/xcsv.cc index cfbc84ac0..b1d9e84cb 100644 --- a/gpsbabel/xcsv.cc +++ b/gpsbabel/xcsv.cc @@ -699,7 +699,7 @@ xcsv_wr_position_deinit(void) static void -xcsv_wr_position(waypoint* wpt) +xcsv_wr_position(Waypoint* wpt) { /* Tweak incoming name if we don't have a fix */ switch (wpt->fix) { diff --git a/gpsbabel/xol.cc b/gpsbabel/xol.cc index 352957db9..adb4e4636 100644 --- a/gpsbabel/xol.cc +++ b/gpsbabel/xol.cc @@ -27,7 +27,7 @@ #include "jeeps/gpsmath.h" #include "garmin_tables.h" -static waypoint* wpt; +static Waypoint* wpt; static route_head* trk; static gbfile* fout; static int space; @@ -70,7 +70,7 @@ xol_shape(xg_string args, const QXmlStreamAttributes* attrv) { if (attrv->hasAttribute("type")) { if (attrv->value("type") == "waypoint") { - wpt = new waypoint; + wpt = new Waypoint; } else if (attrv->value("type") == "polyline") { trk = route_head_alloc(); track_add_head(trk); @@ -162,7 +162,7 @@ xol_rd_deinit(void) /* writer */ static void -xol_fatal_outside(const waypoint* wpt) +xol_fatal_outside(const Waypoint* wpt) { gbfprintf(fout, "#####\n"); fatal(MYNAME ": %s (%s) is outside of convertable area \"%s\"!\n", @@ -177,7 +177,7 @@ xol_fatal_outside(const waypoint* wpt) static void -xol_write_time(const waypoint* wpt) +xol_write_time(const Waypoint* wpt) { QString time_string = wpt->CreationTimeXML(); if (!time_string.isEmpty()) { @@ -195,7 +195,7 @@ xol_write_string(const QString& name, const QString& str) } static void -xol_waypt_bound_calc(const waypoint* wpt) +xol_waypt_bound_calc(const Waypoint* wpt) { waypt_add_to_bounds(&all_bounds, wpt); } @@ -226,7 +226,7 @@ xol_wr_deinit(void) } static void -xol_waypt_disp_cb(const waypoint* wpt) +xol_waypt_disp_cb(const Waypoint* wpt) { double x, y; @@ -276,7 +276,7 @@ xol_track_tlr_disp_cb(const route_head* trk) } static void -xol_trkpt_disp_cb(const waypoint* wpt) +xol_trkpt_disp_cb(const Waypoint* wpt) { double x, y; diff --git a/gpsbabel/yahoo.cc b/gpsbabel/yahoo.cc index ce153cc3b..64f5841b0 100644 --- a/gpsbabel/yahoo.cc +++ b/gpsbabel/yahoo.cc @@ -24,7 +24,7 @@ #include "defs.h" #include "xmlgeneric.h" -static waypoint* wpt_tmp; +static Waypoint* wpt_tmp; static char* as; #define MYNAME "yahoo" @@ -81,7 +81,7 @@ yahoo_wr_init(const char* fname) void wpt_s(xg_string args, const QXmlStreamAttributes* unused) { - wpt_tmp = new waypoint; + wpt_tmp = new Waypoint; } void wpt_e(xg_string args, const QXmlStreamAttributes* unused) -- 2.30.2